Developers · API v1

One API. Every model.

Images, video, audio and 3D behind one API, paid from the same balance as the studio. Create a key in Settings; the CLI is coming soon.

Coming soonThe Ducklygen CLI is on its way. This page previews how it will work; until then, use the API.

$npm i -g @ducklygen/cli
Models
672
Endpoints
9
Minimum top-up
€3

Same call, any output

Swap the model ID to switch between image, video and speech. The fields follow the model.

curl -X POST https://ducklygen.com/api/v1/api/catalog/generations \
  -H "Authorization: Bearer $DUCKLYGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "modelId": "image-model-id",
  "inputs": {
    "prompt": "rubber duck floating on teal water, soft light"
  }
}'
Example render

First render in three steps

  1. 1

    Create an API key

    Sign in with your email, open Settings, API keys and create a key. Top up from €3 in Billing.

    export DUCKLYGEN_API_KEY="dk_live_..."
  2. 2

    The CLI is coming soon

    The command-line tool is not published yet. Until it is, everything runs in the studio.

    npm i -g @ducklygen/cli
  3. 3

    Make your first render

    Pick a model ID from the catalog and send a prompt. Add --dry-run to see the price without spending anything.

    ducklygen run <model> -p "duck on teal waves" -o ./out/
Coming soonDucklygen CLI

Render from the terminal

Run any model from a shell, a CI job or a coding agent. Every render is priced before it starts and drawn from the same balance.

Scripts and CIEvery field of a model is a flag; a local file is uploaded for you.
JSON on stdoutOne JSON document per run, progress and errors on stderr, a non-zero exit on failure.
Coding agentsA skill file teaches your agent to check the price first and cap it.

The @ducklygen/cli package is not published yet. The commands below show how it will work.

Full CLI guide →
Command
ducklygen loginPaste your API key once; it is checked and saved
ducklygen whoamiThe key's name and your balance
ducklygen models --type videoEvery video model with its starting price
ducklygen run <model> -hA model's fields, fetched live: type, default, allowed values
ducklygen run <model> -p "<prompt>" -o ./out/Render and save the result in a folder
ducklygen run <model> -p "..." --dry-runThe exact price, without spending anything
ducklygen run <model> -p "..." --max-price 0.50Refuse to run if the price is higher
ducklygen run <model> -p "..." --json -o ./out/One JSON result, ready for the next step
ducklygen skill installTeach your coding agent to use the CLI

Built for production

Authentication

A Bearer token in the Authorization header. Create keys in Settings and revoke any of them at any time.

Authorization: Bearer dk_live_...

Background renders

Starting a render answers at once with status queued. Poll the render until it has succeeded, failed or been refunded.

{ "status": "queued" }

Price first

Ask for the exact price of your inputs without starting anything. Every amount is in euro cents.

POST /v1/quote

Safe retries

Send an Idempotency-Key header and a retried request never charges twice.

Idempotency-Key: render-042

Limits

Each key has a per-minute limit and an optional daily cap. Past the limit the API answers 429.

429 Too Many Requests

Errors and refunds

JSON errors with a code and a message. A render that fails is refunded to your balance automatically.

{ "status": "refunded" }

Endpoints

Base URLhttps://ducklygen.com/api/v1/api/catalogFull API reference →

GET/meYour key and balance
GET/modelsEvery model
GET/models/detail?id=MODEL_IDOne model and its fields
POST/quotePrice for exact inputs
POST/generationsStart a render
GET/generationsYour recent renders
GET/generations/IDOne render's status
GET/generations/ID/contentThe result file
DELETE/generations/IDDelete a render

Top up €3 and ship today

Create an API key in Settings and call any model. The CLI is coming soon. Failed renders are refunded.