Docs

Everything you need to make your first request.

Quickstart
Sign up, create an API key from your dashboard, then call the API.
curl -X POST https://api.corent.ai/v1/images/generate \
  -H "Authorization: Bearer co_live_..." \
  -H "Content-Type: application/json" \
  -d '{"prompt": "a fox reading a book", "preference": "fast"}'
Authentication
Every request needs a bearer token from an API key created in your dashboard.
Authorization: Bearer co_live_...
Building with an AI agent?
Webhooks, streaming progress, batch generation, and function-calling specs for Claude, OpenAI, and LangChain live on the agents docs page.
Model selection
Corent automatically selects the best underlying implementation for each tier based on cost, latency, reliability, and current health. This is handled transparently. You get results, not model management. Every response tells you which Corent tier served your request (corent-image-fast, corent-video-cinematic, and so on), never which model or provider ran underneath.

Endpoints

POST/v1/images/generate
Generate an image. Corent selects the best implementation for your request.

Request body

{
  "prompt": "a fox reading a book in a cozy library",
  "style": "photorealistic",       // optional
  "preference": "fast",            // fast | cheap | quality | balanced
  "aspect_ratio": "1:1"            // optional
}

Response

{
  "id": "...",
  "status": "completed",
  "images": [{ "url": "https://...", "width": 1024, "height": 1024 }],
  "meta": {
    "model": "corent-image-fast",
    "cost_cents": 2,
    "duration_ms": 1500
  }
}
POST/v1/videos/generate
Start a video generation. Returns immediately with an id — video takes 1-2 minutes.

Request body

{
  "prompt": "a small sailboat crossing a calm harbor",
  "preference": "balanced",
  "aspect_ratio": "16:9",
  "duration_s": 5
}

Response

{
  "id": "...",
  "status": "processing",
  "meta": { "model": "corent-video-premium" }
}
GET/v1/jobs/{id}
Poll a job's status. Once a video completes, this is where the charge lands.

Response

{
  "id": "...",
  "status": "completed",
  "videos": [{ "url": "https://..." }],
  "meta": { "model": "corent-video-premium", "cost_cents": 63, "duration_ms": 94000 }
}
GET/v1/account/balance
Current prepaid balance, in cents.

Response

{ "balance_cents": 998 }
GET/v1/account/usage
Recent jobs and total spend.

Response

{
  "total_spent_cents": 72,
  "total_jobs": 7,
  "recent_jobs": [ ... ]
}
POST/v1/account/deposit
Creates a Stripe Checkout session to add funds.

Request body

{ "amount_cents": 1000 }

Response

{ "checkout_url": "https://checkout.stripe.com/..." }
GET/v1/routing/explain?request_id=...
Which tier served a past request, why, and whether failover occurred.

Response

{
  "model": "corent-image-fast",
  "reasoning": "Optimized for cost and speed.",
  "candidates_considered": 4,
  "failover_occurred": false
}
GET/v1/status
Live operational status for every Corent tier. Public, no authentication needed.

Response

{
  "tiers": [
    { "name": "corent-image-fast", "status": "operational" },
    { "name": "corent-video-cinematic", "status": "operational" }
  ]
}