Menu
View Categories

Introduction

The Slapshot API lets you send video to Slapshot’s AI models and get back production-ready outputs: rotoscoping mattes, camera tracks and depth maps. It’s the same engine that powers Slapshot Autopilot, exposed so you can plug it into your pipeline, render farm or asset management system.

The API is organized around REST. It uses predictable resource-oriented URLs, accepts JSON request bodies, returns JSON responses and uses standard HTTP methods and status codes.

Base URL

All requests are made over HTTPS to:

Base URL
https://autopilot.slapshot.ai/api

Authentication

Every request must include your API key in the x-api-key header. See Authentication for details.

Quickstart

Create a job that generates a roto matte for one shot, then check its progress.

1. Create a job

curl -X POST "https://autopilot.slapshot.ai/api/jobs" \
  -H "x-api-key: $SLAPSHOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "assets": [
      {
        "source_path": "autopilot_reel/102825/Chocolate.mov",
        "services": [
          { "type": "roto", "output_path": "output/110625" }
        ]
      }
    ]
  }'

2. Check the job status

curl "https://autopilot.slapshot.ai/api/jobs/$JOB_ID" \
  -H "x-api-key: $SLAPSHOT_API_KEY"

Instead of polling, you can subscribe to webhooks to be notified when jobs and inferences complete.

Endpoints

MethodEndpointDescription
POST/jobsCreate a job
GET/jobsList jobs
GET/jobs/{job_id}Retrieve a job
DELETE/jobs/{job_id}Cancel a job
GET/inferencesList inferences
GET/inferences/{inference_id}Retrieve an inference
DELETE/inferences/{inference_id}Cancel an inference

Core concepts

Jobobject
A batch of work you submit. A job contains one or more assets and is identified by a job_id.
Assetobject
A source video (source_path) plus the services to run on it.
Servicestring
The type of processing to run on an asset: roto, tracking or depth_map.
Inferenceobject
A single service running on a single asset. Each inference has its own inference_id, status and progress.
Metadataobject
Any key–value pairs you attach to a job or asset (project, shot, submitter…). Metadata is returned with results and can be used to filter list requests.

Statuses

StatusMeaning
pendingQueued and waiting to start.
runningCurrently being processed.
completedFinished successfully. Outputs are written to the service’s output_path.
failedProcessing did not complete.
cancelledCancelled by a cancel request.

Pagination

List endpoints return results a page at a time. Use the page query parameter to move between pages, or follow the next and previous URLs in the response.

Paginated response
{
  "count": 1000,
  "next": "https://autopilot.slapshot.ai/api/jobs?page=4",
  "previous": "https://autopilot.slapshot.ai/api/jobs?page=2",
  "results": [ ... ]
}
Iterate over every page
def iter_jobs(**filters):
    url, params = f"{BASE_URL}/jobs", filters
    while url:
        resp = requests.get(url, headers=HEADERS, params=params)
        resp.raise_for_status()
        data = resp.json()
        yield from data["results"]
        url, params = data["next"], None  # "next" already contains the query string

for job in iter_jobs(status="running"):
    print(job["job_id"], job["percent_complete"])

Errors

Slapshot uses conventional HTTP status codes to indicate whether a request succeeded. Codes in the 2xx range mean success, 4xx codes mean there was a problem with the request, and 5xx codes mean something went wrong on our side.

CodeMeaning
200 OKThe request succeeded.
400 Bad RequestThe request body or parameters are invalid, for example a missing source_path or an unknown service type.
401 / 403The API key is missing or invalid.
404 Not FoundThe job or inference ID doesn’t exist.
5xx Server ErrorSomething went wrong on Slapshot’s side. Retry the request after a short delay.

Support

Questions about the API or need a key? Email support@slapshot.ai.