ddooflo Open Access · for AI tools and developers
Checking sign-in status…
Integration guide Top up & pricing ← Back to site home
Open API v1.1 · Developer console

Plug dooflo into your own AI tools

This is dooflo's Open Access Console, built for AI tools and developers (DSH, Codex, workbuddy, Doubao · Coze all work). It isn't listed in the site menu; just go straight to dooflo.com/openapi. Everything runs on one /v1 contract: create a key, copy a config block, and you can render your first image from a terminal in under 10 minutes.

Want the site itself (image generation, video, pricing)? ← Back to the dooflo.com site home. The other half of the integration docs lives in the tutorial's "Plug dooflo into your AI tools".

20 endpoints · 6 groups Debug mode doesn't consume credits Async jobs + polling Outputs return an assetKey, so you can chain "image → video" openapi.yaml (the single source of truth for the contract)
01

Three steps to connect

You don't need to read all the docs. Follow the three steps below — a first integration takes about 10 minutes.

1

Create an API key after signing in

Create a key under "My API keys" below. The plaintext is shown only once, so copy and save it right away. Once it's created, this page fills the key into "Tool setup snippets" and "Playground" for you (it only lives in this tab's memory and is gone when you close the tab).

2

Copy the config for your tool

In "Client config", switch by tool: DSH / Codex / workbuddy / Doubao (desktop client) / Doubao · Coze (cloud) / generic curl. The server generates the content per tool and swaps in the key you just created — copy the whole block and it runs as is.

3

Run a curl self-check

Call GET /v1/me first: if it hands back your balance and credentials, the key works — then submit a real job.

◎
The self-check command is always this one (replace $DOOFLO_API_KEY with your key):
curl -s https://dooflo.com/v1/me -H "Authorization: Bearer $DOOFLO_API_KEY"
Note: the key already carries the dfk_ prefix, so paste the whole string — don't type another dfk_ yourself, or it turns into dfk_dfk_… and returns 401 immediately.
02

My API keys

A key is bound to your account and your credits. Create one per tool; revoking one doesn't affect the others.

Each key runs 3 jobs concurrently by default
03

Connect with a device code

When another tool (a terminal / CLI / desktop client) shows you a verification code, approve it here.

Why is this step needed?
Terminals, CLIs and desktop clients can't see your browser session — they have no cookies, and they shouldn't make you type your password into a command line. So the flow works the other way round:
  1. The client calls POST /v1/auth/device and gets a pair of codes: it keeps deviceCode to itself and shows you userCode (something like H8NP-EKYK).
  2. In a browser where you're signed in, enter this userCode and approve it — that's the box above. This step is you authorizing it in person, so nobody else can approve it even with the code.
  3. The client polls POST /v1/auth/token with deviceCode and exchanges it for a token starting with dvt_ (valid for 30 days); after that it can call the API as usual.
The code is valid for 10 minutes and works once. Go back to your terminal after approving — success normally shows up within 5 seconds.
04

Tool setup snippets

Both the content and the source of truth live on the server: what you see here is the live response from GET /v1/quickstart?tool=…, not a hard-coded sample. <YOUR_KEY> in each snippet below is automatically replaced with the key you just created — hit Copy and the whole block runs as is.

05

Playground

Check the price first, then submit — you can run the whole flow without generating anything. Debug mode is on by default.

✓
Debug mode doesn't consume credits. With "Debug mode" checked, the request body carries "mock": true; the server only runs the flow, validates the parameters and returns a jobId — nothing is really generated and no credits are charged. You are only billed once you turn it off yourself.
Doesn't consume credits
06

Endpoint overview

20 endpoints in 6 groups. Open any row to see request / response examples.

20 endpoints total Download openapi.yaml
ⓘ
In the examples, $DOOFLO_BASE = https://dooflo.com/v1 and $DOOFLO_API_KEY = your key. A successful response returns the payload directly (no data wrapper), and failures always look like {"error":{"code","message","requestId"}}. Send your credential in Authorization: Bearer; X-Api-Key also works.
07

Rate limits and billing

Read these five before you integrate — they head off most "why did it error / why was I charged" questions.

⇉

3 concurrent jobs per key

The default is limits.concurrency = 3; a 4th job immediately returns 429 (with retryAfter). Concurrency is counted per key, so each tool holding its own key gets its own allowance.

◍

Only real generations are billed

estimate is free. A submission with "mock": true only runs the flow and returns a jobId — nothing is generated and no credits are taken. Only real generations are settled against actualCredits.

!

Not enough balance returns 402

If you're short on credits, submitting returns 402 Payment Required; the job never enters the queue and nothing is charged. Check credits.balance with GET /v1/me first.

⏳

downloadUrl expires after 1 hour

The downloadUrl in an output is a signed link that stops working after 1 hour — when it expires, just call GET /v1/jobs/{id}/artifacts again. assetKey is long-lived, so use it directly as firstFrameKey / referenceImages[].

◎

No top-ups inside the API

This API has no path for money to flow in; GET /v1/me only returns a rechargeUrl. To top up, go back to the website: Top up and pricing (or the top-up entry in your dashboard). That way external tools never touch your payment method.

08

OpenAI-compatible API (a different shape, the same key)

Set base_url to https://dooflo.com/v1 plus this key, and you can plug straight into Cherry Studio / ChatBox / NextChat / LobeChat / Dify / LangChain / the official OpenAI SDK. Inference, image generation and video generation all share one key.

ⓘ
How this differs from sections 01–07 above: the sections above describe our own native contract (the capability + params tree, /v1/jobs, MCP), meant for agents whose configuration you can edit, such as DSH / Codex / workbuddy / Doubao. This section is the standard OpenAI shape (/v1/chat/completions, /v1/images/generations, /v1/videos), which any client that only asks for a base URL and a key can connect to. Both sets share the same key, the same credits and the same job history.
◈

4 capability endpoints

GET /v1/models (works without a key too, so you can test whether the URL is right)
POST /v1/chat/completions (streaming / non-streaming)
POST /v1/images/generations (synchronous image generation)
POST /v1/videos → poll → /content

◍

Both base_url formats work

Clients that append /v1 themselves (Cherry Studio / NextChat / ChatBox) should use https://dooflo.com; clients where you write the path yourself (OpenAI SDK / LangChain / LobeChat / Dify) should use https://dooflo.com/v1. We collapse a duplicated /v1, so even the wrong one connects.

⇉

Video is async, with four states

queued → in_progress → completed / failed. There is no cancelled — a canceled job shows up as failed with error.code = "canceled". Keep your poll interval at 3 seconds or longer.

↪

/content returns 302

It is not a 200 with the bytes inline. curl with -L, Python requests and Node fetch all follow it by default. Clients that do not follow redirects should instead call GET /v1/videos/{id} and read x_dc.download_url.

!

Low balance returns 429

The OpenAI contract has no 402; a drained quota returns 429 + type:"insufficient_quota". The 402 on our native contract above stays as it is — each contract sticks to its own clients.

⚡

Streaming is genuinely incremental

Every token the upstream emits is pushed through as it arrives, so time to first token = the moment the model starts answering. The frame format and [DONE] are fully standard. Exception: if a channel's backend has stream turned off, the whole body is emitted in one go (same format, just different timing).

09

Pricing and billing dimensions (synced live from the backend)

Every number below comes from the configuration under "Unified model gateway → API models and rotation" in the admin panel (GET /api/pricing/api-models). When ops change a price this page follows immediately, so you never get "the page says 6 credits but 8 were actually charged".

ⓘ
Three different billing dimensions — get them straight before reading the tables: Image generation is billed per image (a different price per resolution); video generation is billed per second (a different price per resolution) or per clip (long-shot tiers, priced by second bracket); inference is billed per million tokens (input and output priced separately). It is normal for the same model to cost different amounts at different resolutions — the upstream simply charges different rates per resolution.
Loading... —

Video Per-second models list the unit price for each resolution; per-clip models list second brackets

Image generation The per-image price varies with the resolution tier (1K / 2K / 4K)

Inference Per million tokens; input and output are priced separately, and output usually costs more

Prices are denominated in credits (1 CNY = 100 credits). You are charged the price in effect at submission time; the group multiplier (e.g. 20% off if you are in the "Gold" group) is applied on top of the listed price — see 07 Rate limits and billing for details. A failed generation is refunded in full automatically.