Ir para o conteúdo

Developers

DeepSia API

Generate images, videos and audio with every DeepSia model from your own app, script or plugin. Requests are paid with your DeepSia credits, at the same prices as on the site.

1. Get a key

Create one in Account → Settings → API. It starts with dsk_ and is shown once. Send it in the Authorization header. Limits: 120 requests a minute, plus your plan's number of generations running at once.

curl https://deepsia.io/api/v1/account \
  -H "Authorization: Bearer dsk_..."

2. Generate

Pick a model id from GET /models, then start a generation. Settings use the names listed for the model (for example duration, aspectRatio, resolution).

curl -X POST https://deepsia.io/api/v1/generations \
  -H "Authorization: Bearer dsk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-2.5",
    "prompt": "A woman walks on a beach in Dakar at sunset",
    "settings": { "duration": 5, "aspectRatio": "16:9", "resolution": "720p" }
  }'

The answer is the generation (id, status, cost). Poll GET /generations/{id} every few seconds until status is completed (the files are in outputs[].url) or failed (credits are refunded). Add an idempotencyKey (UUID) to retry safely.

3. Send images, videos or audio

Upload in two steps, then pass the upload's url in media with a role (start, end, reference, video, audio, source) the model accepts.

# 1. ticket
curl -X POST https://deepsia.io/api/v1/uploads/ticket -H "Authorization: Bearer dsk_..." \
  -H "Content-Type: application/json" \
  -d '{"contentType":"image/png","size":482193,"name":"face.png"}'
# → { "ticket": { "upload_url": "...", "public_url": "..." }, "token": "..." }

# 2. PUT the file to ticket.upload_url
curl -X PUT "<upload_url>" -H "Content-Type: image/png" --data-binary @face.png

# 3. confirm
curl -X POST https://deepsia.io/api/v1/uploads -H "Authorization: Bearer dsk_..." \
  -H "Content-Type: application/json" \
  -d '{"publicUrl":"<public_url>","contentType":"image/png","size":482193,"name":"face.png","token":"<token>"}'
# → { "id": "...", "url": "..." }

# 4. use it
"media": [{ "role": "start", "url": "<url>" }]

Endpoints

Base URL: https://deepsia.io/api/v1

GET/modelsEvery model: inputs, settings, starting price in credits.
POST/quoteWhat a request would cost, in credits. Nothing is charged.
POST/uploads/ticketStep 1 of an upload: a signed URL to PUT your file to.
POST/uploadsStep 2: confirm the upload; its url can be sent as media.
GET/uploadsYour uploads.
POST/generationsStart a generation (credits are taken, refunded on failure).
GET/generationsYour generations, newest first (?limit, ?cursor, ?surface).
GET/generations/{id}Status, cost and output URLs of one generation.
GET/generations/{id}/outputs/{n}The file of output n, with open CORS (for browser plugins).
GET/accountYour credit balance.

Errors come back as { error, code } with a status: 401 bad key, 402 not enough credits, 404 not found, 429 too many requests or generations running, 400 invalid input.

MCP server: DeepSia inside Claude, Cursor and other assistants

The same key works with our MCP server (Model Context Protocol) at https://deepsia.io/api/mcp. Your assistant can then choose a model, tell you the price and create images, videos and audio for you, paid with your credits. Tools: list_models, get_model, get_quote, generate, get_generation, list_generations, get_account.

Without a key: in an app that supports sign-in for MCP servers (the Claude apps: add a custom connector with the address above), you are sent to DeepSia, you allow the app, and it is connected. Remove its access at any time in Account → Settings → API.

Add DeepSia to ClaudeGuide for Claude, ChatGPT, Le Chat, Cursor…

With a key, in Claude Code:

claude mcp add --transport http deepsia https://deepsia.io/api/mcp \
  --header "Authorization: Bearer dsk_..."

Cursor, VS Code and other clients (mcp.json):

{
  "mcpServers": {
    "deepsia": {
      "type": "http",
      "url": "https://deepsia.io/api/mcp",
      "headers": { "Authorization": "Bearer dsk_..." }
    }
  }
}

Then ask, for example: “Make a 16:9 image of a sunset over Dakar with DeepSia, with the cheapest model.” Generating spends credits, so the assistant is told to confirm expensive requests with you first.