API reference

Every operation of the Scarleta API with its method, path, parameters, request and response fields, error codes and code samples in cURL, JavaScript and Python.

Before you start

Base URL
https://api.scarleta.ai
Authentication
Send Authorization: Bearer <key>. Paid keys start with scar_live_, free keys with sk_free_.
Responses
Most success bodies are { "data": ..., "meta": { "request_id": ... } } and most errors are { "error": { "code", "message", "request_id", "docs_url" } }. A few operations answer an older or different shape (a { "data": ... } body with no meta, a flat { "error": "<code>", "message": ... } error, a bare body, a file or an empty body). The Responses section of each operation shows its exact body: follow that, not this summary. Every code is explained on the error codes page.
Request limits
100 per hour on a free key, 10,000 per hour on a paid key. Over the limit, the API answers 429 and a Retry-After header.
Cost
1 token is 1 second of audio, billed at $0.10 per minute. A free account starts with 300 tokens, one time. Each operation says whether it uses tokens.
Machine-readable spec
openapi.json (OpenAPI 3.1).

Operations

Analysis

4 operations

POST /v1/analyze · GET /v1/analyze/{job_id}

Analysis results

2 operations

GET /v1/audio/{audioId}/analyses · GET /v1/audio/{audioId}/midi

Archives

4 operations

POST /v1/audio/archives · GET /v1/audio/archives/{jobId}

Batch

7 operations, 1 webhook

POST /v1/batch · GET /v1/batch/{batch_id}

Chat

2 operations

POST /v1/chat · GET /v1/chat/{job_id}

Conversation shares

3 operations

GET /v1/conversations/{conversationId}/shares · POST /v1/conversations/{conversationId}/shares

Conversations

9 operations

GET /v1/conversations · POST /v1/conversations

Documents

4 operations

GET /v1/documents · POST /v1/documents

Feedback

1 operation

POST /v1/feedback

File actions

5 operations

POST /v1/audio/archive · POST /v1/audio/best

File conversations

1 operation

GET /v1/audio/{fileId}/conversations

File details

5 operations

GET /v1/audio/{audioId}/cover · PUT /v1/audio/{audioId}/cover

Files

7 operations

GET /v1/audio · DELETE /v1/audio/{fileId}

Imports and duplicates

4 operations

POST /v1/audio/duplicates/check · GET /v1/audio/imports

Library

6 operations

GET /v1/audio/library · POST /v1/audio/library/batch

MCP

2 operations

GET /v1/mcp/rpc · POST /v1/mcp/rpc

Media links

1 operation

POST /v1/media/refresh-url

Notes

3 operations

GET /v1/audio/{audioId}/notes · POST /v1/audio/{audioId}/notes

Recipe catalog

5 operations

GET /v1/recipe/{recipe_id} · GET /v1/recipe/{recipe_id}/comments

Recipes

11 operations, 1 webhook

DELETE /v1/recipe/{recipe_id} · GET /v1/recipe/{recipe_id}/compare

Renders

1 operation

GET /v1/audio/{fileId}/children

Saved views

8 operations

GET /v1/audio/views · POST /v1/audio/views

Shares

3 operations

GET /v1/audio/{audioId}/shares · POST /v1/audio/{audioId}/shares

Similar sounds

2 operations

POST /v1/audio/library/similar · GET /v1/audio/library/similar/{audio_id}

Sound grouping

4 operations

POST /v1/audio/library/cluster · GET /v1/audio/library/cluster/{job_id}

Tags

7 operations

GET /v1/audio/tags · POST /v1/audio/tags

Trash

4 operations

GET /v1/audio/trash · POST /v1/audio/trash/delete-forever

Upload sessions

7 operations

GET /v1/audio/uploads · POST /v1/audio/uploads

Versions

4 operations

GET /v1/audio/ungrouped · GET /v1/audio/versions/{versionId}/audio-url

Webhooks

6 operations

GET /v1/webhooks · POST /v1/webhooks