Developers

Sketchfab Data API

WARNING: this documentation hasn't been updated recently. Some sections of this documentation might be outdated.

Your application can interact with Sketchfab with a REST API accessible through https with a private api-key. With the API, you can upload a 3D model to Sketchfab, change its shading and manage folders. Your API key is available in My Settings > Password.

Upload a model

You must perform an HTTP POST to https://api.sketchfab.com/v1/models.

The uploaded file must be in one of the supported formats (see the FAQ).

Parameters

The POST request accepts the following parameters:
token : your Sketchfab API token
fileModel : the model you want to upload
title : model title
description (optional) : model description
tags (optional) : list of tags separated by space
private (optional) : if set to True, then the model is private
password (optional) : if private is set to True, you can add a password to protect your file

Response

The API will respond:
{success: true, {result: {id: 'xxxxxx'} } when the upload succeeded
{success: false, error: 'error message'} when there is an error

You can use the returned id to embed a viewer showing the model.
See the oEmbed section to learn how to embed the viewer.

Examples

Here are examples of uploading in various languages.

Uploading in Python
Uploading in Bash/Curl
Uploading in Ruby
Uploading in Node.JS
Uploading in PHP
Uploading in C++/QT
Uploading in WinINet
Uploading in Objective C/Cocoa

Change the shading

You must POST to https://api.sketchfab.com/v1/models/YOUR-MODEL-ID/options/shading

Parameters

Parameters for the POST request are:

token : your sketchfab API token
value: "{ type : 'no-shading'}" : to make the model shadeless
value: "{ type : 'default-shading'}" : to use the default shading

Response

{success: true } if ok
{success: false, error: 'error message'} if error

Manage folders

This functionality requires a paid account.

Create a folder: POST to https://api.sketchfab.com/v1/folders
Update a folder: POST to https://api.sketchfab.com/v1/folders/folder_id
Get a folder's details: GET to https://api.sketchfab.com/v1/folders/folder_id