Deni API

Images, videos and voice with one key. This page is everything you need to use it.

Address  https://api.denimakes.co/api/v1
Your key  goes into every request as a header: Authorization: Bearer dk_…
Keep the key to yourself. If it leaks, ask for a new one: the old one stops working at once.

Three steps

Every job works the same way: start it, ask how it is doing, fetch the file.

# 1. start an image
curl -X POST https://api.denimakes.co/api/v1/images/generate \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: my-order-001" \
  -d '{"prompt": "a red apple on a white table", "model": "nano-banana-2", "aspectRatio": "1:1"}'
# -> {"id": "0b1f…", "queuePosition": 2}

# 2. ask until status is COMPLETED (or FAILED)
curl https://api.denimakes.co/api/v1/images/status/0b1f… -H "Authorization: Bearer $KEY"

# 3. fetch the file (the answer sends you on to it: -L follows)
curl -L -o apple.jpg https://api.denimakes.co/api/v1/images/download/0b1f… -H "Authorization: Bearer $KEY"

Files are kept for 24 hours (pictures of the economy lane for about 2 hours). Download what you want to keep.

The calls

CallWhat it does
GET /modelsEvery model your key may use, with its price, and your own limits and use under key. Also /images/models and /videos/models.
POST /images/generateStart an image.
POST /videos/generateStart a video.
POST /tts/generateStart a voice-over.
GET /{images|videos|tts}/status/{id}Where the job stands: PENDING, PROCESSING, FINALIZING, COMPLETED, FAILED, CANCELLED. A finished job carries its billing.
GET /{images|videos|tts}/download/{id}The file. Answers with a redirect to it (?index=1 for a second picture, if a job made more than one).
POST /{images|videos|tts}/cancel/{id}Stop a job that has not finished. A cancelled job costs nothing.
GET /limitsYour limits and what is left of them.
GET /usageWhat you used this month, by day and by kind (?startDate=2026-12-01&endDate=2026-12-31).
GET /jobsYour running jobs and the ones that finished in the last five minutes (?completedAfter=2026-12-05T12:00:00Z, ?kind=videos).
GET /tts/minimax/voices
GET /tts/elevenlabs/voices/defaults
GET /tts/elevenlabs/voices/shared
The voices you can use (?search=, ?page=, ?page_size=).

Images

FieldWhat to send
promptRequired. What the picture shows (up to 15,000 characters).
modelAn id from GET /models. Left out = the default model.
aspectRatioFor example "1:1", "16:9", "9:16". Each model lists the ones it has.
resolution"1k", "2k" or "4k" where the model has them. Larger can cost more: see the model's price.
quality, seedOnly where the model lists them.
imageUrlsReference pictures for editing or image-to-image: a list of https://… addresses, or pictures inside the request as data:image/jpeg;base64,… (jpeg, png, webp, gif). The first four are used. A request can be 8 MB at most, so prefer addresses.

The economy image lane

Models whose id starts with grsai/ (for example grsai/gpt-image-2.6, grsai/nano-banana-2, grsai/nano-banana-pro) cost a fraction of a cent to about a cent and a half a picture, at one price for every size. They take prompt, model, aspectRatio, imageUrls and, for the nano-banana models, resolution. Start, status and download work exactly as above. They cannot be cancelled.

Videos

FieldWhat to send
promptRequired.
modelAn id from GET /models.
aspectRatio, resolution, duration, modeWhere the model has them. duration is seconds: "6". The price of each resolution and length is in the model's ppuResolutionDurationPricesCents.
imageUrlsPictures to start from (addresses or data:image/…). With videoInputMode "keyframes" the first is the first frame and the second the last; "ingredients" uses them as references.
imageJobIdInstead of imageUrls: the id of one of your own finished image jobs (not of the economy lane).
mutetrue removes the sound from the finished file.

Voice

FieldWhat to send
textRequired. What is said. You pay by the character.
voiceIdRequired. From one of the voice lists.
voiceProvider"elevenlabs" (default), "minimax" or "edgetts", matching the list the voice came from.
modelIdOptional voice model.
voiceSettingsOptional: stability, similarityBoost, style (0 to 1), speed (0.7 to 2), useSpeakerBoost.
splitOutputtrue gives a ZIP of parts instead of one MP3.

Your limits

Your key has a limit for the month, one for the day, a number of jobs that may run at once and a number of requests a minute. GET /limits and the key part of GET /models show them with what is left. Days and months turn over at midnight, Brussels time.

While a job runs, its expected price is set aside from your limit. When it finishes you are charged what it really cost; a job that fails or is cancelled costs nothing.

AnswerWhat it meansWhat to do
402 PAYMENT_REQUIREDA limit is reached. details.scope says which (day, month or job) and details.resetsAt when it starts again.Wait for the reset, or ask for a higher limit.
429 CONCURRENCY_LIMIT_REACHEDAs many of your jobs are running as your key allows.Wait for one to finish (Retry-After says how long to wait before asking again).
429 TOO_MANY_REQUESTSToo many requests in a minute.Slow down; ask for a job's status every few seconds, not faster.
403 FORBIDDENYour key is paused or does not include that product.Ask the person who gave you the key.
401 UNAUTHORIZEDThe key is missing or wrong.Check the header: Authorization: Bearer dk_…
400 VALIDATION_ERRORA field is wrong; the message names it.Fix the request.
502 / 503The service could not take the job right now.Send the same request again with the same Idempotency-Key.

Never pay twice for one order

Send an Idempotency-Key header with every start (any text of your own, up to 255 characters of letters, digits and _ . : -, different for every order). If your connection drops and you send the same request again with the same key, you get the same job back and are charged once. The same key with a different request is refused with 409.

One request makes one result: to get four pictures, send four requests.

A complete example

import time, requests

API = "https://api.denimakes.co/api/v1"
H = {"Authorization": "Bearer dk_…"}

job = requests.post(API + "/videos/generate", headers={**H, "Idempotency-Key": "clip-0001"},
                    json={"prompt": "a fox runs through snow", "model": "wan-3.0",
                          "resolution": "480p", "duration": "6", "aspectRatio": "9:16"}).json()
while True:
    s = requests.get(API + "/videos/status/" + job["id"], headers=H).json()
    if s["status"] in ("COMPLETED", "FAILED", "CANCELLED"):
        break
    time.sleep(5)
if s["status"] == "COMPLETED":
    open("fox.mp4", "wb").write(requests.get(API + "/videos/download/" + job["id"], headers=H).content)
    print("cost (cents):", s["billing"]["totalAmountCents"])
else:
    print("not made:", s.get("userMessage"))