Reference

Developer documentation

One key for image, video, voice and text, with the exact charge on every response.

Start here

Start in 5 minutes

I am a:

Developer

An answer from a model in your code.

AI agent

Find, price and run things safely for someone.

Person

Make something in your browser, no code.

Tested: the code examples in these guides run against a stand-in server in Corent's automatic checks on every change. Paid runs on the live service are not part of those checks.

01

Quickstart

A key, a POST, a finished image with its price attached.

  1. 01Create an account and add prepaid credit, from $5.
  2. 02Create an API key in the dashboard. It is shown once.
  3. 03Send the request below with that key.
curl -X POST https://api.corent.tech/v1/images/generate \  -H "Authorization: Bearer $CORENT_API_KEY" \  -H "Content-Type: application/json" \  -d '{"prompt": "a fox reading a book"}'
Response
{  "id": "...",  "status": "completed",  "images": [{ "url": "https://...", "width": 1024, "height": 1024 }],  "meta": {    "model": "image-routed",    "cost_cents": 4,    "duration_ms": 1500,    "quality": "default",    "hint": "Made with Corent's default. Add \"quality\": \"best\" for top quality."  }}

Images usually return inline with the charge. A slow render comes back as a job id to poll instead.

Two optional fields

That prompt is the whole request: Corent picks the cheapest model that does the job well. Add "quality": "best" for the top model when price matters less, and max_cost_cents for a limit the request never goes over. Both work on images, video, voice and chat.

Request body
{  "prompt": "a fox reading a book",  // optional: the top model for the job, price matters less  "quality": "best",  // optional: this request never costs more than 10 cents  "max_cost_cents": 10}

Kits and connector

The Python and TypeScript kits make, poll and retry for you: images as safe background jobs, idempotency keys on every retry, and the exact charge on every result.

Install the kits
pip install corentnpm install corent-sdk

In the stores today: corent 0.10.0 on PyPI, corent-sdk 0.7.0 on npm, corent-mcp 0.11.3 on npm. All take quality and max_cost_cents. The npm kit and the npm connector cannot run open models yet: use the Python kit, plain HTTP or the hosted connector.

The connector lets an AI agent such as Claude make images, video, voice and films with your key. Use the hosted one at https://mcp.corent.tech/mcp, with nothing to install, or run it yourself:

Claude Code
claude mcp add corent -e CORENT_API_KEY=co_live_... -- npx -y corent-mcp

02

Authentication

Every request carries a bearer token from a key you created in the dashboard.

Header
Authorization: Bearer co_live_...
Base URL
https://api.corent.tech, and every path on this page starts with /v1.
OpenAI kits
https://api.corent.tech/v1, with the /v1: the kit adds /chat/completions itself. See Chat completions.
Where
Server-side only, never in browser code.

Keys

Every new key can do everything: images, video, text and voice, with any model.

You can limit a key in the dashboard if you want to. Let Corent choose the model for every lane or only some of them, lock the key to exact models, or have it always choose the model itself. A key can also always use best quality, or carry a spending limit per request, so you set it once instead of on every call. A request's own quality wins over the key's setting. The key's limit per request is a ceiling: a request can ask for less with max_cost_cents, never more.

Keys are created, listed, changed and revoked in the dashboard. The account endpoints behind that screen take a dashboard sign-in or a management key, never an ordinary API key, so a leaked key can never create more keys or raise its own cap.

PATCH/v1/account/api-keys/{id}

Change a key after it is made: name, scopes, allowed_models, default_quality ("best" or null), default_max_cost_cents and data_region ("us_europe" or null). A change applies within a minute.

curl
curl -X PATCH https://api.corent.tech/v1/account/api-keys/KEY_ID \  -H "Authorization: Bearer $CORENT_MANAGEMENT_KEY" \  -H "Content-Type: application/json" \  -d '{"default_quality": "best", "default_max_cost_cents": 50}'

Keep data in the US and Europe

Turn on "Keep my data in the US and Europe" in a key's settings, or set "data_region": "us_europe" on the key (null turns it off). It is off by default. Requests made with it then only use suppliers whose company and machines are in the US, the UK, the EU or EEA, or Switzerland. Few models qualify today: text works on the Claude models that can stay in the US, at 10% more, and images, video, voice, films, the image tools and plain-language requests are not available. A request no qualifying model can do gets a 400 that says so before anything is charged, and is never sent elsewhere. Our own database and storage in Germany and our servers in the US handle every request either way, and so does any address you send results to yourself, such as a webhook. The security page lists every supplier, where it is, and what it keeps.

curl
curl -X PATCH https://api.corent.tech/v1/account/api-keys/KEY_ID \  -H "Authorization: Bearer $CORENT_MANAGEMENT_KEY" \  -H "Content-Type: application/json" \  -d '{"data_region": "us_europe"}'

03

Images

POST/v1/images/generate

Generate an image. Returns inline unless you ask for a job.

FieldTypeRequiredDescription
promptstringyesWhat to generate.
qualitystringno"best" for the top model, price matters less. Leave it out and Corent picks the cheapest model that does the job well.
max_cost_centsnumbernoThe most this request may cost. Never exceeded: if no model fits under it, the request is refused before anything runs.
modelstringnoPin an exact model from GET /v1/models. Never substituted.
stylestringnoStyle hint, for example photorealistic.
aspect_ratiostringnoFor example 1:1, 16:9 or 9:16.
asyncbooleannotrue returns 202 with a job id. Use it for best quality and other slow renders.
reference_image_urlsstring[]noUp to 16 public https images, depending on the model: GET /v1/models lists max_reference_images for each, and asking for more is refused before anything runs. The prompt is applied as an edit of them, so a face, character or product stays the same across generations. Only models that can edit take it, and Corent picks among them.
nnumberno1 to 10. Each one is a real render at the normal price, so n=4 costs four images. meta.cost_cents is the total.
seednumbernoSame seed, prompt and model gives the same image, so you can render it again and change one thing. The seed used comes back in meta.seed even when you did not send one.
negative_promptstringnoWhat must not appear, for example text or a watermark.
source_image_urlstringnoStart from this picture instead of from noise. Pair it with strength.
strengthnumberno0 to 1. How far the render may travel from source_image_url. 0 keeps it, 1 ignores it.
output_formatstringnopng, jpeg or webp. png is the one that carries transparency.
transparentbooleannoTransparent background for logos and cutouts. Forces png.
width / heightnumbernoExplicit pixel size. Pass both or neither.
enhance_promptbooleannoCorent rewrites your prompt before dispatch to get a better render. false sends it exactly as typed.
customer_idstringno1 to 128 characters. Your own id for the end customer this render is for. Comes back on the receipt and filters GET /v1/account/usage.
Idempotency-KeyheadernoAny unique string up to 255 characters. A repeat returns the original job instead of billing twice.

Not every model takes every setting. Whatever the chosen model could not honor comes back in meta.unsupported_options, so an ignored setting never reads as an applied one.

Reference images today: up to 16 on corent-gpt-image-2-med, up to 16 on corent-gpt-image-2-low, up to 16 on corent-gpt-image-2-high, up to 10 on corent-seedream-4.0 and up to 4 on corent-nano-banana-2-edit. Leave model out and Corent picks among them. The list moves with the menu, so read supports_reference_images and max_reference_images from GET /v1/models rather than from this page.

Request body
{  "prompt": "a fox reading a book in a cozy library",  // optional: "best" for the top model; leave it out for Corent's default  "quality": "best",  // optional: never charged more than this  "max_cost_cents": 20,  // both optional  "style": "photorealistic",  "aspect_ratio": "1:1",  // optional; true returns 202, then poll /v1/jobs/{id}  "async": false}
curl -X POST https://api.corent.tech/v1/images/generate \  -H "Authorization: Bearer $CORENT_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "prompt": "a fox reading a book in a cozy library",    "quality": "best",    "max_cost_cents": 20,    "aspect_ratio": "1:1"  }'

POST/v1/images/edit

Regenerate only the masked region and leave every other pixel alone.

Different from reference_image_urls, which regenerates your subject from a reference, so its logo and color are a likeness rather than a copy. Here the unmasked pixels are your own file, pixel for pixel, which is what an advertisement needs when the product carries someone else’s trademark. The result comes back as a lossless PNG, so the preserved pixels are identical values re-encoded, not the original bytes.

FieldTypeRequiredDescription
image_urlstringyesPublic https URL of the image to edit.
mask_urlstringyesA black-and-white mask the same size. White is regenerated, black is kept pixel for pixel.
promptstringyesWhat to make inside the white region, up to 2000 characters.
max_cost_centsnumbernoThe most this edit may cost.
customer_idstringno1 to 128 characters. Your own id for the end customer.

POST/v1/images/upscale

Make an existing image bigger and sharper. No supplier serves upscale today: the call is refused with a plain sentence before anything runs, and nothing is charged. The fields below are what it takes once a supplier is live.

FieldTypeRequiredDescription
image_urlstringyesPublic https URL of the image to enlarge and sharpen.
promptstringnoGuidance for the added detail, up to 2000 characters. Leave it out to enlarge faithfully.
max_cost_centsnumbernoThe most this upscale may cost.
customer_idstringno1 to 128 characters. Your own id for the end customer.

POST/v1/images/remove-background

Cut the subject out. Returns a PNG with a real transparent background, for logos, product shots and compositing. It comes back at the width and height you sent, but may be a re-render of your subject rather than a trace of your own pixels: a very close likeness, not a copy, and on a large original the finest texture comes back softer. Use the masked edit above when that distinction matters.

FieldTypeRequiredDescription
image_urlstringyesPublic https URL of the image to cut out.
max_cost_centsnumbernoThe most this may cost.
customer_idstringno1 to 128 characters. Your own id for the end customer.

04

Video and jobs

POST/v1/videos/generate

Returns 202 with an id. Video takes one to five minutes and bills per second of output.

FieldTypeRequiredDescription
promptstringyesWhat to generate.
qualitystringno"best" for the top model, price matters less. Leave it out for Corent's default.
max_cost_centsnumbernoThe most the whole clip may cost. Never exceeded: if no model fits under it, the request is refused before anything runs.
modelstringnoPin an exact model from GET /v1/models. Never substituted.
duration_snumbernoSeconds of output, snapped to what the chosen model offers. GET /v1/models lists each model's lengths; corent-seedance-2.5 takes 4 to 30.
resolutionstringno720p, 1080p or 4k. Corent picks a model that can deliver it; a pinned model clamps down to its own top resolution, it never errors. corent-seedance-2.5 goes up to 1080p.
aspect_ratiostringnoFor example 16:9 or 9:16, or adaptive to follow the input frame or clip.
image_urlstringnoAnimate an existing image instead of generating from text alone.
audiobooleannoAsk for native sound. true routes only to models that actually render audio, so a silent model can never quietly serve the request; false prefers a silent one. GET /v1/models reports has_audio per model.
end_image_urlstringnoThe frame the clip should end on. With image_url this is the go-from-A-to-B effect.
camerastringnostatic, pan_left, pan_right, zoom_in, zoom_out, orbit_left, orbit_right, tilt_up or tilt_down.
negative_promptstringnoWhat must not appear in the clip.
seednumbernoReproducibility, same contract as images.
fpsnumbernoFrames per second, where the model offers a choice.
customer_idstringno1 to 128 characters. Your own id for the end customer. Rides on the job and its receipt.
Request body
{  "prompt": "a small sailboat crossing a calm harbor",  "aspect_ratio": "16:9",  "duration_s": 5,  // snapped to what the chosen model offers  "resolution": "720p",  // optional: the whole clip never costs more than this  "max_cost_cents": 100,  // optional, image-to-video  "image_url": "https://..."}
curl -X POST https://api.corent.tech/v1/videos/generate \  -H "Authorization: Bearer $CORENT_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "prompt": "a small sailboat crossing a calm harbor",    "aspect_ratio": "16:9",    "duration_s": 5,    "max_cost_cents": 100  }' // 202 { "id": "...", "status": "processing" }, then poll:curl https://api.corent.tech/v1/jobs/JOB_ID \  -H "Authorization: Bearer $CORENT_API_KEY"

GET/v1/jobs/{id}

Poll a job. The charge lands here when the video completes, next to the delivered pixel dimensions measured from the stored file.

Prefer GET /v1/jobs/{id}/stream, which is server-sent events, to avoid polling.

Or pass webhook_url on the request and the full result is POSTed to you when the job finishes. Add webhook_secret and every delivery carries X-Corent-Signature: t=<unix seconds>,v1=<hex>, where v1 is HMAC-SHA256 of the secret over "t.rawbody" (Stripe's scheme). Verify over the raw bytes, compare in constant time, and reject a t older than 300 seconds. Corent tries up to three times, at about 0, 2 and 6 seconds, and GET /v1/jobs/{id}/webhook_deliveries lists every attempt. An unsigned delivery only means no secret was given.

Response
{  "id": "...",  "status": "completed",  "videos": [{    "url": "https://...",    "width": 1920,    "height": 1080,    "resolution": "1080p",    "duration_s": 5  }],  "meta": { "model": "video-routed", "cost_cents": 162, "duration_ms": 94000 }}

POST/v1/jobs/{id}/cancel

Stop a job that has not finished. A job that completed just before the cancel landed stays completed and is billed for what was actually delivered, and the cancelled flag in the reply tells you which happened. Canceling is best effort against the supplier: the render may already be running on their side.

Consistent characters, editing, and extending

Six more fields on POST /v1/videos/generate keep a character, product or place the same from shot to shot, change a clip you already have, or carry one forward. Name a reference in the prompt by its position in the list: @Image 1, @Video 2, @Audio 1.

FieldTypeRequiredDescription
reference_image_urlsstring[]noKeep a character, product or place consistent. Up to 30 on corent-seedance-2.5; up to 6 on corent-gemini-omni-1.1-flash and corent-gemini-omni-flash, which pick their own 3 to 10 second length, so omit duration_s there. Refer to them in the prompt as @Image 1, @Image 2, in the order given.
reference_video_urlsstring[]noCopy motion, camera or style from a clip, and the source for edit and extend. Up to 10 on corent-seedance-2.5 (2 to 30 seconds each, 30 seconds in all); up to 3 on the two Gemini Omni models, as references only. @Video 1 in the prompt.
reference_audio_urlsstring[]noFollow a voice or a music track. Up to 10 on corent-seedance-2.5, 3 on the Seedance 2.0 family, which also needs an image or a video alongside. @Audio 1 in the prompt.
taskstringnoauto (default), reference, edit or extend. edit changes an existing clip: at least one reference video, and words like add, remove, replace or change in the prompt. extend continues a clip forward or backward: a reference video, and words like extend or continue. Only corent-seedance-2.5 serves edit and extend.
return_last_framebooleannotrue adds last_frame_url to the finished job, a PNG of the final frame stored by Corent. Pass it as image_url on the next call and the next shot starts exactly where this one ended.
output_formatstringnomp4 (default) or mov, which keeps more color precision for grading.

Four rules. First and last frame (image_url and end_image_url) and the reference_* fields cannot be mixed in one call. On first/last-frame, edit and extend tasks the aspect ratio follows the input, so omit aspect_ratio or pass adaptive. An edit keeps the length of the source clip, so omit duration_s. Reference images and videos work on corent-seedance-2.5, corent-gemini-omni-1.1-flash, corent-gemini-omni-flash; reference audio, edit, extend, the last frame and first-and-last frame only on corent-seedance-2.5, so pin it with model for those. A model that cannot take what you sent answers with a clear 400 and bills nothing.

GET /v1/models reports what each video model can do: supports_reference_images, max_reference_images, supports_reference_videos, supports_reference_audio, supports_video_edit, supports_video_extend, supports_last_frame and supports_first_last_frame. Build the picker from those flags, not from this page.

Real faces: the supplier refuses photos or videos of real people as references. It accepts characters made inside Corent, meaning any image you generated through the API in the last 30 days. Make the character first, then reference it. To use a real person who has been verified with the supplier, email support@corent.tech.

Reference to video, with the last frame kept
curl -X POST https://api.corent.tech/v1/videos/generate \  -H "Authorization: Bearer $CORENT_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "prompt": "@Image 1 steps out of the cafe into light rain, handheld, dusk",    "model": "corent-seedance-2.5",    "reference_image_urls": ["https://..."],    "duration_s": 8,    "return_last_frame": true  }' // the finished job carries the final frame as a PNG stored by Corent:// "last_frame_url": "https://..."
The next shot, from last_frame_url
curl -X POST https://api.corent.tech/v1/videos/generate \  -H "Authorization: Bearer $CORENT_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "prompt": "she opens an umbrella and crosses the street",    "model": "corent-seedance-2.5",    "image_url": "https://.../last_frame.png",    "duration_s": 8,    "return_last_frame": true  }' // image_url is the last_frame_url of the previous job, so shot two// starts on the exact frame shot one ended on. No aspect_ratio: it// follows the frame.
Extend a clip
curl -X POST https://api.corent.tech/v1/videos/generate \  -H "Authorization: Bearer $CORENT_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "prompt": "continue @Video 1 forward: she reaches the far curb and looks back",    "model": "corent-seedance-2.5",    "task": "extend",    "reference_video_urls": ["https://..."],    "duration_s": 5  }' // the new footage continues the clip; the prompt says forward or backward
Edit a clip
curl -X POST https://api.corent.tech/v1/videos/generate \  -H "Authorization: Bearer $CORENT_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "prompt": "in @Video 1 replace the red umbrella with a yellow one, keep everything else",    "model": "corent-seedance-2.5",    "task": "edit",    "reference_video_urls": ["https://..."]  }' // no duration_s: an edit keeps the length of the source clip

The connector takes the same fields on generate_video and adds edit_video and extend_video. The kits take them on videos.generate and add videos.edit(...) and videos.extend(...).

05

Films

One sentence in, one finished film with sound out.

Describe a film in one sentence and Corent makes the whole thing. It writes the script, creates the characters once, and shoots every scene with those same characters speaking their lines. It checks each scene, reshoots a bad one once, and joins everything into one video with sound.

MethodEndpointWhat it does
POST/v1/films/planWrites the film and prices it. Free. The plan is kept for 24 hours.
POST/v1/filmsStarts making a planned film, or plans and makes one from a brief. Returns 202 with a film_id.
GET/v1/films/{film_id}The stage, progress, each scene, and when done the finished video_url and the charge.
GET/v1/films/{film_id}/streamThe same, pushed as server-sent events on every change, instead of polling.
GET/v1/filmsYour films, newest first, one page at a time. Takes ?customer_id= to narrow it.
POST/v1/films/{film_id}/cancelStops a film that has not finished.

POST/v1/films/plan

FieldTypeRequiredDescription
briefstringyesThe film in a sentence, up to 2000 characters.
duration_snumbernoLength of the finished film, 10 to 120 seconds. Default 30.
aspect_ratiostringno16:9 (default), 9:16 or 1:1.
resolutionstringno720p (default) or 1080p. 1080p costs more.
languagestringnoThe language the characters speak, for example en.
customer_idstringno1 to 128 characters. Your own id for the end customer.
curl, plan
curl -X POST https://api.corent.tech/v1/films/plan \  -H "Authorization: Bearer $CORENT_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "brief": "a 50 second parody where 5 founders start a startup, know nothing, and the AI part is easy because they used Corent",    "duration_s": 50,    "aspect_ratio": "16:9"  }'
Response
{  "plan_id": "...",  "title": "...",  "logline": "...",  "style": "...",  "characters": [{ "id": "c1", "name": "...", "description": "..." }],  "scenes": [{    "index": 0,    "duration_s": 6,    "setting": "...",    "action": "...",    "camera": "...",    "characters": ["c1"],    "dialogue": [{ "character_id": "c1", "line": "..." }]  }],  "total_duration_s": 50,  "estimated_cost_cents": 1400,  "estimated_cost_range": { "min": 1000, "max": 2000 },  // the plan is kept for 24 hours  "expires_at": "..."}

POST/v1/films

FieldTypeRequiredDescription
max_cost_centsnumberyesThe most this film may cost. If the estimate is above it the request is refused with a 400 and nothing is spent.
plan_idstringnoThe plan from POST /v1/films/plan: the story and price you showed. Send this or a brief.
briefstringnoInstead of plan_id: the film in a sentence, with the same options as the plan call, planned and made in one go.
webhook_urlstringnoReceives the finished film, signed like every other webhook when webhook_secret is set.
webhook_secretstringnoSigns the delivery with X-Corent-Signature.
customer_idstringno1 to 128 characters. Rides on the film and its receipt.
Idempotency-KeyheadernoA repeat returns the original film instead of starting a second one.
curl, make the film
curl -X POST https://api.corent.tech/v1/films \  -H "Authorization: Bearer $CORENT_API_KEY" \  -H "Content-Type: application/json" \  -H "Idempotency-Key: film-order-42" \  -d '{    "plan_id": "...",    "max_cost_cents": 1600  }' // 202: { "film_id": "...", "status": "queued", "estimated_cost_cents": 1400 }

A 402 means the balance is too low for the estimate. A 50 second 720p film with five characters costs roughly $10 to $20 and takes about 15 to 30 minutes, so follow it on the stream, poll GET /v1/films/{film_id} about once a minute, or pass webhook_url.

The stages

queued
Waiting to start.
writing
Writing the script: the story, the scenes and every line of dialogue.
casting
Creating the characters, once, so each one looks the same in every scene.
shooting
Shooting the scenes with those characters speaking their lines.
checking
Checking each scene, and reshooting a bad one once.
editing
Joining the scenes into one video with sound.
completed
Done. video_url is the finished film and cost_cents is the charge.
failed
It could not be finished. error_message says why.
cancelled
Stopped on request.

progress_percent and stage_detail say how far along it is, and each scene carries its own status, its clip and how many times it was reshot. quality_notes lists anything the checks found.

Finished film
{  "film_id": "...",  "status": "completed",  "progress_percent": 100,  "title": "...",  "video_url": "https://...",  "duration_s": 50,  "cost_cents": 1312,  "billed": true,  "quality_notes": ["..."],  "scenes": [{ "index": 0, "status": "completed", "video_url": "https://...", "reshoots": 0 }]}

The price is shown before anything is paid: planning is free. The charge never goes above max_cost_cents, and the finished film carries its exact charge in cost_cents.

POST /v1/intent answers task_type film, with next_step POST /v1/films/plan, for anything one clip cannot deliver: longer than one take, or several characters telling a story. /v1/intent/execute does not make a single clip for it. The connector has plan_film, make_film, get_film and cancel_film. The kits have films.plan, films.create, films.get, films.wait, films.cancel and films.list.

06

Speech

POST/v1/audio/speech

Synchronous. Returns the finished audio file and the exact charge.

FieldTypeRequiredDescription
textstringyesThe text to speak. Billed per 1,000 characters, rounded up to the next 1,000.
voice_idstringnoFrom GET /v1/voices. Omit it for the default narration voice.
modelstringnoPins an exact speech model, for example corent-eleven-multilingual-v2.
stabilitynumberno0 to 1. Low is more expressive and varies more take to take; high is steadier.
similaritynumberno0 to 1. How closely to hold the original voice's character.
stylenumberno0 to 1. Extra expressiveness.
speednumbernoPlayback speed. 1.0 is natural pace.
languagestringnoISO code for the multilingual models, for example en or pt-BR.
output_formatstringnomp3, wav or pcm.
customer_idstringno1 to 128 characters. Your own id for the end customer. Rides on the receipt.
Request body
{  "text": "Welcome to Corent. One API for image, video, and voice.",  // optional  "voice_id": "...",  // optional; pins a speech model  "model": "corent-eleven-multilingual-v2"}
curl -X POST https://api.corent.tech/v1/audio/speech \  -H "Authorization: Bearer $CORENT_API_KEY" \  -H "Content-Type: application/json" \  -d '{"text": "Welcome to Corent. One API for image, video, and voice."}'
Response
{  "id": "...",  "status": "completed",  "audio_url": "https://...",  "meta": { "model": "corent-speech-tts", "cost_cents": 14, "duration_ms": 1840 }}

corent-speech-tts on a receipt means Corent chose the voice model; it is not a model you can pin. Sending it back as model returns 404. Pinnable names come from GET /v1/models.

GET/v1/voices

Every voice this endpoint accepts as voice_id, with a display name, a preview clip and neutral descriptors you can filter on. Call it before naming a voice: voice_id cannot be guessed.

07

Chat completions

POST/v1/chat/completions

The OpenAI chat shape. Point an OpenAI kit at https://api.corent.tech/v1 with your Corent key and keep your code.

Base URL
https://api.corent.tech/v1. The /v1 matters: the kit adds /chat/completions to it.
Key
Your Corent key, in the kit's api_key.
curl -X POST https://api.corent.tech/v1/chat/completions \  -H "Authorization: Bearer $CORENT_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "model": "corent",    "messages": [{"role": "user", "content": "Write a haiku about shipping fast."}],    "max_tokens": 200,    "quality": "best",    "max_cost_cents": 10  }'
FieldTypeRequiredDescription
modelstringyescorent lets Corent pick the model. An exact model from GET /v1/models pins it.
qualitystringno"best" for the top model when model is corent. Leave it out for Corent's default.
max_cost_centsnumbernoThe most this reply may cost. Never exceeded.
messagesarrayyesThe conversation, in the OpenAI shape.
max_tokensnumbernoUpper bound on the reply.
streambooleannotrue streams the reply as server-sent events.
customer_idstringno1 to 128 characters. Your own id for the end customer. Rides on the receipt, same as every other generating call.
Request body
{  // "corent" lets Corent pick; an exact model such as "corent-gpt-5.6-sol" pins it  "model": "corent",  // optional: the top model for the job  "quality": "best",  "messages": [{ "role": "user", "content": "Write a haiku about shipping fast." }],  "max_tokens": 200,  "stream": false}
Response
{  "id": "chatcmpl-...",  "object": "chat.completion",  "model": "corent",  "choices": [{ "message": { "content": "..." }, "finish_reason": "stop" }],  "usage": { "prompt_tokens": 14, "completion_tokens": 19, "total_tokens": 33 },  // Corent's extension: the exact charge. Every reply costs at least 3 cents.  "corent": { "cost_cents": 3 }}

Streaming, tool calling and JSON mode pass through. Billed per token, with the charge on the corent.cost_cents extension. Every reply costs at least 3 cents, however short.

What is OpenAI-shaped, and what is not

The request and the reply of POST /v1/chat/completions are the OpenAI chat shape, streaming included, plus Corent's own fields: quality, max_cost_cents and customer_id on the way in (OpenAI's user field is taken as customer_id too), and corent.cost_cents on the way out. Model names are Corent's: corent lets Corent pick, and an exact corent-* name from GET /v1/models pins it.

Two things are not in the OpenAI shape yet. GET /v1/models answers with models, count and pricing_note, not with object and data, so a kit's models.list() does not work: fetch the list plainly, as below. Errors come back as described under Errors and retries, not in OpenAI's error envelope, so a kit raises its generic error for the status code and the sentence is in the response body. Images, video and speech are Corent's own endpoints, not OpenAI's.

curl https://api.corent.tech/v1/models // { "models": [{ "model": "corent-nano-banana-2", "kind": "image", "status": "live", ... }], "count": 235, ... }

08

Uploads

POST/v1/uploads

Send a file, get a url. Every other endpoint accepts that url wherever it asks for an image.

Two ways to send it: multipart with a single field named file, or JSON with the bytes in base64. Up to 25 MB either way. The url comes back ready to pass as image_url, mask_url, source_image_url, end_image_url or a reference, so a file on your side never has to be public first. The file tools also take PDF, zip, text, Markdown, CSV, JSON, subtitle and Excel files, by their id.

FieldTypeRequiredDescription
filemultipartnoThe file itself, as a multipart form field. Use this form or the JSON form, not both.
data_base64stringnoThe file, base64-encoded, for the JSON form.
content_typestringnoThe MIME type, for example image/png. Required with data_base64.
filenamestringnoOptional. Kept for your own reference.
curl -X POST https://api.corent.tech/v1/uploads \  -H "Authorization: Bearer $CORENT_API_KEY" \  -F "file=@product.png"
Request body, JSON
{  // the file, base64, no data: prefix  "data_base64": "iVBORw0KGgo...",  "content_type": "image/png",  // optional, kept for your own reference  "filename": "product.png"}
Response
{  "id": "...",  "url": "https://...",  "content_type": "image/png",  "bytes": 184322}
FieldTypeDescription
idstringThe upload id.
urlstringThe address every other endpoint accepts as image_url, mask_url or a reference.
content_typestringThe type as stored.
bytesnumberThe size as stored.
Then, as a reference
{  "prompt": "the same bottle on a wet slate counter",  // the url from POST /v1/uploads  "reference_image_urls": ["https://..."]}

An upload is not a generation. It costs nothing and appears on no receipt.

09

Plain-language requests

POST/v1/intent

Describe what you want in a sentence. Corent answers with the plan and its price, and makes nothing.

FieldTypeRequiredDescription
intentstringyesWhat you want, in your own words.
qualitystringno"best" for the top model. Leave it out for Corent's default.
Request body
{ "intent": "a vertical 10 second clip for TikTok of a sunrise over the alps" }

The answer is the plan (what to make, its shape and length, and the prompt Corent would send) with estimated_cost_cents. Anything one clip cannot deliver, such as a story with several characters, comes back as task_type film with next_step POST /v1/films/plan.

POST/v1/intent/execute

The same, and then it makes it, if the estimate is within what you agreed to pay.

FieldTypeRequiredDescription
intentstringyesWhat you want, in your own words.
confirm_estimated_cost_cents_up_tonumberyesThe most you agree to pay. If the estimate is higher, nothing is made and executed is false.
qualitystringno"best" for the top model.
webhook_urlstringnohttps only. For an image, the call answers 202 at once and the result is POSTed here.
Request body
{  "intent": "a vertical 10 second clip for TikTok of a sunrise over the alps",  // the most you agree to pay; above it, nothing is made  "confirm_estimated_cost_cents_up_to": 150}
curl -X POST https://api.corent.tech/v1/intent/execute \  -H "Authorization: Bearer $CORENT_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "intent": "a product photo of a matte black watch on marble, square",    "confirm_estimated_cost_cents_up_to": 25  }'
Response
{  "plan": { "task_type": "video", "aspect_ratio": "9:16", "duration_seconds": 10, ... },  "estimated_cost_cents": 120,  "executed": true,  "actual_cost_cents": 118,  // an image url, or a video job id to poll at GET /v1/jobs/{id}  "result": { ... }}

How the ceiling is checked: without quality best, the ceiling has to cover the most the plan could cost on any live model, not only the estimate POST /v1/intent showed. A ceiling under that is refused with executed false and the estimate, and spends nothing. With quality best the ceiling is simply the cap: Corent routes under it and refuses, unbought, only if no model fits.

A film plan is never made as a single clip here: nothing is made, and the answer points to POST /v1/films/plan.

10

Batches

POST/v1/images/generate/batch

Up to 50 images or videos in one call. Each item is its own request at the normal price.

Video works the same at POST /v1/videos/generate/batch. Items run five at a time. An item takes prompt, style, quality, max_cost_cents, aspect_ratio and customer_id; video items also take duration_s, resolution and the image and reference fields of a single video request, plus model, audio and seed. A customer_id on the batch applies to every item that names none. Image items are always routed: to pin an image model, send single requests. A key's price limit covers the whole batch, shared equally between its items.

Request body
{  "items": [    { "prompt": "a red bicycle on a white wall" },    { "prompt": "a blue bicycle on a white wall", "quality": "best" }  ],  // optional: each item's result is POSTed here when it finishes  "webhook_url": "https://...",  "webhook_secret": "..."}

GET/v1/batches/{batch_id}

How many items there are, how many are done, failed or still running, and each job. Every job id is also a normal job at GET /v1/jobs/{id}.

Response
// 202{ "batch_id": "...", "job_ids": ["...", "..."] } // GET /v1/batches/{batch_id}{ "batch_id": "...", "total": 2, "completed": 1, "failed": 0, "pending": 1, "jobs": [...] }

11

Quality and models

Leave the model out and Corent picks it. Name a model and it runs exactly that.

One quality switch

Leave quality out and Corent picks the cheapest model that does the job well, checks the result, and reroutes if a model fails. Send "quality": "best" and it uses the top model for the job, and price matters less. That is the only quality setting, on images, video, voice and chat.

max_cost_cents caps any request. It is never exceeded: if no model fits under it, the request is refused before anything runs. Video is priced for the whole clip, at the length and resolution you asked for.

Pinning a model

Pass model for direct access: no routing, no substitution. If it cannot deliver, the request fails rather than switching to another model. On chat, "model": "corent" lets Corent pick and an exact name pins it.

curl -X POST https://api.corent.tech/v1/images/generate \  -H "Authorization: Bearer $CORENT_API_KEY" \  -H "Content-Type: application/json" \  -d '{"prompt": "a fox reading a book", "model": "corent-nano-banana-2"}' // the response names the model you pinned:// "meta": { "model": "corent-nano-banana-2", "cost_cents": <its price>, ... }

Names read corent-nano-banana-2. The bare name nano-banana-2 still resolves, so older code keeps working. Pin a model that GET /v1/models lists as live: a model that is off answers with a 503 and bills nothing, it is never swapped for another.

Models
GET /v1/models, public, no authentication.
Status
GET /v1/status, one line each for image, video, text and voice.

12

Models in your prompt

Start the prompt with "use seedance 2.5:" and Corent uses Seedance 2.5.

Works on images, video and voice, not chat. The name has to read as an instruction, so put it where an instruction goes: at the start ("use seedance 2.5: a fox in snow"), as its own part at the end after a comma or period ("a fox in snow, made with Gemini Omni Flash"), or in brackets at the start or end, like [gemini omni flash]. In an image or video prompt, "model: gemini omni flash" works anywhere. A name in the middle of a sentence ("a fox in snow with Gemini Omni Flash"), a style reference ("in the style of") or anything in quotes is left alone, and the prompt is sent as you wrote it. Corent takes the instruction out of the prompt, so the words "use seedance 2.5" never end up in the picture.

POST /v1/videos/generate
{  "prompt": "use seedance 2.5: a fox running in snow",  "duration_s": 5} // the receipt says what happened:// "model_from_prompt": { "name": "Seedance 2.5", "used": true, "reason": "..." }// "hint": "You asked for Seedance 2.5 in your prompt, so we used it."

It is billed like the same model pinned in model. If that model cannot do the job, would go over your limit, or is down, Corent picks another one and the receipt says why. A model field in the request wins over a name in the prompt.

13

Response and receipt

Every success says what served it and what it cost. The meta block is the receipt.

FieldTypeDescription
idstringThe request or job id.
statusstringcompleted, processing or failed.
meta.modelstringThe exact model you pinned, or the lane Corent routed, such as image-routed.
meta.cost_centsnumberThe exact charge for this request, in cents.
meta.duration_msnumberHow long the generation took.
meta.qualitystringdefault or best, on a routed request.
meta.hintstringOne line on how to change the quality, or which model your prompt asked for.

Chat completions carries the same number as corent.cost_cents. Video bills on completion, so its charge appears on GET /v1/jobs/{id}.

GET/v1/requests

Every past request with its charge, what served it, the quality and where that choice came from (quality_source: request, key, prompt or default), how many models were considered and whether Corent had to switch to another one. The receipt shows what was billed.

Response
{  "requests": [{    "request_id": "...",    "status": "completed",    "model": "image-routed",    "cost_cents": 4,    "billed": true,    "quality": "default",    "quality_source": "default",    "hint": "Made with Corent's default. Add \"quality\": \"best\" for top quality.",    "candidates_considered": 3,    "failover_occurred": false,    "output_url": "https://..."  }],  "next_before": null}

GET /v1/routing/explain?request_id=... answers the same question for one request.

14

Per-customer usage

Tag a request with your own customer id and the charge follows that id, so you can bill your users from our receipts.

The tag

customer_id is an optional string, 1 to 128 characters, accepted on every generating call: images, edits, upscales, background removal, video, speech and chat completions. Corent never reads it. It is stored with the job and printed back on the receipt exactly as sent.

Request body
{  "prompt": "a fox reading a book",  // your end customer, your own id for them  "customer_id": "acct_8f2c"}

The filter

GET/v1/account/usage?customer_id=

The same usage report, narrowed to one customer. total_spent_cents is the total for the period the report covers, in cents, and total_jobs says how many jobs that period holds: today it is the most recent 100 jobs, so for an invoice that must cover everything, read every receipt from GET /v1/requests, which pages through them all. Without the filter the report covers the whole account.

curl "https://api.corent.tech/v1/account/usage?customer_id=acct_8f2c" \  -H "Authorization: Bearer $CORENT_API_KEY"
Response
{  // the total for the period the report covers, in cents  "total_spent_cents": 418,  // how many jobs that period holds; today it is your most recent 100 jobs  "total_jobs": 100,  "completed_jobs": 97,  "spent_by_type_cents": { "image": 118, "video": 300 },  "recent_jobs": [{ "id": "...", "type": "image", "status": "completed", "charge_cents": 4, "customer_id": "acct_8f2c", ... }],  "customer_id": "acct_8f2c"}

The receipt

Every receipt from GET /v1/requests carries customer_id when the request did, so a charge can always be traced to the customer it was made for.

Receipt
{  "request_id": "...",  "status": "completed",  "model": "image-routed",  "cost_cents": 4,  "billed": true,  "customer_id": "acct_8f2c"}

15

Errors and retries

Each status, what it means, whether to retry, and what to do next.

StatusMeaningRetryWhat to do
400 / 422Invalid requestNoFix the field named in the error and resend. A 400 also answers a price limit no model fits under, before anything runs.
401Invalid API keyNoCheck the header: Authorization: Bearer co_live_...
402Insufficient balanceNoAdd funds in the dashboard.
403This key is not allowed to do thatNoThe key is limited to other models or kinds of request, or the endpoint needs a dashboard sign-in or a management key. Use a key that allows it, or change the key in the dashboard.
404Resource not foundNoCheck the job or batch id, or the model name against GET /v1/models.
409Idempotency-Key already usedNoOn chat completions a repeated key is refused. Send a new key for a fresh reply.
429Rate limitedYesWait the seconds given in the Retry-After header.
500Internal errorOnceRetry once. If it persists, contact support.
502 / 503Temporary upstream failureYesSafe to retry: routing already failed over internally. A 503 also answers a tool no supplier serves today, such as upscale.

One error shape

Every error body carries detail, one sentence that says what went wrong and how to fix it, and an error object with the same sentence in a fixed shape: code, a short word a program can switch on; message, the sentence; and type, the family the code belongs to. Read error.code in code and detail for a person; older code that reads only detail keeps working. On a 422 for a malformed body, detail lists each field that failed. Errors are never in OpenAI's envelope, so an OpenAI kit on chat raises its generic error for the status code.

Error body
{  "error": {    // a short word a program can switch on    "code": "insufficient_balance",    // the same sentence as detail    "message": "Insufficient balance. Add funds in the dashboard.",    // the family the code belongs to    "type": "..."  },  "detail": "Insufficient balance. Add funds in the dashboard."}

Send an Idempotency-Key on image or video generation and a repeat returns the original job. A timed-out request can be retried blindly and can never double-bill.

16

Limits and balance

Every key carries its own ceiling, and every balance is prepaid.

Limits

Requests per minute, jobs running at the same time and an optional daily spending limit, per key. A new key starts at 300 requests a minute and 300 jobs at the same time. You can raise them to 6,000 and 5,000. There is no daily limit unless you set one: your prepaid balance is the ceiling. Across all keys, an account is limited to 3,000 requests a minute.

PUT/v1/account/api-keys/{id}/limits

Deliberately requires a dashboard sign-in or a management key, not an API key: a leaked key must never raise its own cap.

Request body
{ "requests_per_minute": 120, "concurrent_jobs": 20, "daily_cost_cap_cents": 5000 }

requests_per_minute 1 to 6000, concurrent_jobs 1 to 5000, daily_cost_cap_cents an integer or null for no cap.

On 429, Retry-After gives the wait in seconds. Batches take up to 50 items and run five at a time, each billed at the normal rate.

Open models: capacity and the line

GET/v1/open/public-models

No key needed. Each model carries a capacity block: how many runs can be going at once, the typical and cold start time measured from real runs (with how many runs that rests on, or null when not measured), the largest input it takes and its time limit. The queue block says how many requests one key or account may have running and waiting. GET /v1/open/capacity says which models have a free place now.

POST/v1/open/invocations

Waits in line when every place is taken, and nothing is held or charged until the run starts. POST /v1/open/runs does not wait: when a model is busy, or someone is already waiting for it, it answers 503 with Retry-After and nothing is charged. A full line answers 429 with Retry-After.

Balance

GET/v1/account/balance

Response
{ "balance_cents": 998, "held_cents": 40, "available_cents": 958 }

held_cents is reserved against jobs still running. A 402 checks available_cents, so a request can be refused while balance_cents still looks healthy.

GET /v1/account/usage returns recent jobs and the total for the period it covers (today, the most recent 100 jobs), and takes ?customer_id= to narrow it to one of your customers. POST /v1/account/deposit opens a card top-up from $5, and /deposit/crypto from $10.

Back to the top

17

API reference

The machine-readable reference, and what the kits and the connector can do today.

OpenAPI
https://api.corent.tech/openapi.json. Every endpoint, field and response shape, generated from the live API. Point a client generator or an agent at it.
Base URL
https://api.corent.tech for every endpoint on this page. OpenAI kits take https://api.corent.tech/v1.
Kits
In the stores today: corent 0.10.0 on PyPI, corent-sdk 0.7.0 on npm, corent-mcp 0.11.3 on npm. All take quality and max_cost_cents. The npm kit and the npm connector cannot run open models yet: use the Python kit, plain HTTP or the hosted connector.
Connector
The hosted connector at https://mcp.corent.tech/mcp is newer than the npm package (0.11.3) and is the one with the open model tools. Its generate tools take quality and max_cost_cents.
Coding agents
corent.tech/llms.txt is this page as plain text, kept to the same facts.