---
title: "Generate Image"
method: POST
path: "/v1/images/generate"
tags: ["images"]
---

# Generate Image

`POST /v1/images/generate`

## Request

- Base URL: `https://api.corent.tech` (the document declares no server; this is the origin it was published from)
- URL: `https://api.corent.tech/v1/images/generate`
- Auth: HTTP bearer

## Headers

- `Idempotency-Key` string, nullable

## Request body

- ImageGenerateRequest
  - `prompt` string, required
  - `style` string, nullable
  - `tier` string, nullable: Quality tier (preferred): air | lite | premium | pro | max_pro. See GET /v1/tiers for the live menu and prices.
  - `model` string, nullable: Direct model access: pin an exact model by name, e.g. "corent-flux-schnell". GET /v1/models publishes every name in that `corent-` spelling, and it is what `meta.model` and the receipt answer with; older spellings of the same model (the bare name, historical route names) are still accepted here, so existing integrations keep working. Bypasses smart routing -- no substitution, flat cost-plus pricing. Mutually exclusive with tier.
  - `preference` string: LEGACY alias, still honored for backward compatibility: fast | cheap | quality | balanced. Ignored when tier is set — use tier instead.
  - `aspect_ratio` string
  - `async` boolean: When true, returns 202 with a job id immediately and renders in the background; poll GET /v1/jobs/{id} (or stream /v1/jobs/{id}/stream) for the result. Recommended for max_pro and other slow renders so a client-side timeout can never lose a finished image.
  - `webhook_url` string, nullable
  - `webhook_secret` string, nullable
  - `reference_image_urls` string[], nullable: 1 to 16 public https image URLs to keep a character, face or product consistent across generations. Each model takes its own number: GET /v1/models lists supports_reference_images and max_reference_images (for example 16 on corent-gpt-image-2-med, 10 on corent-seedream-4.0, 4 on the nano-banana edit models). Asking a model or tier for more than it takes is a 400 and nothing is billed. Omit for text-to-image.
  - `n` integer: How many images to render, 1 to 10. Each one is a separate render and bills at the normal rate, so n=4 costs four images. They are produced concurrently and returned together; `meta.cost_cents` is the total for all of them.
  - `seed` integer, nullable: Reproducibility. The same seed with the same prompt and model gives the same image, so you can render it again and change one thing. The seed actually used comes back on the job even when you did not name one, where the provider reports it. Not every model supports it: `meta.unsupported_options` lists anything the chosen model could not honour.
  - `negative_prompt` string, nullable: What must NOT appear, e.g. "text, watermark, extra fingers".
  - `source_image_url` string, nullable: Image-to-image: start from this public https picture instead of from noise. Pair with `strength`. Different from reference_image_urls, which pins an identity on edit models.
  - `strength` number, nullable: How far the render may travel from source_image_url. 0 keeps it, 1 ignores it.
  - `output_format` string, nullable: Delivered file type: png | jpeg | webp. png is the one that carries transparency.
  - `transparent` boolean: Transparent background, for logos and product cutouts. Forces png.
  - `enhance_prompt` boolean: Corent rewrites your prompt before dispatch to get a better render. Set false to send it exactly as typed, which is what you want if you have already tuned it.
  - `width` integer, nullable: Explicit pixel width; pass with height.
  - `height` integer, nullable: Explicit pixel height; pass with width.
  - `customer_id` string, nullable: Optional tag for YOUR end user, so you can attribute spend: 1 to 128 characters from A-Z a-z 0-9 . _ : @ -. Stored on the job, returned on receipts, and filterable with GET /v1/account/usage?customer_id=...

## Response `200`

Successful Response

- ImageGenerateResponse
  - `id` string, required
  - `status` string, required
  - `images` GeneratedImage[], required
    - `url` string, required
    - `width` integer, required
    - `height` integer, required
    - `source_url` string, nullable: To use a realistic character as a video reference on corent-seedance-2.5, pass source_url within 24 hours.
    - `source_url_expires_at` string, nullable: When source_url stops working (ISO 8601, 24 hours after the render).
  - `meta` AppRoutersImagesGenerationMeta, required
    - `model` string, required
    - `cost_cents` integer, required
    - `duration_ms` integer, required
    - `seed` integer, nullable
    - `unsupported_options` string[], nullable

## Other responses

- `202`: Accepted for asynchronous processing; result delivered by webhook.
- `400`: Invalid request (bad parameters or input).
- `401`: Missing or invalid API key.
- `402`: Insufficient prepaid balance.
- `403`: API key lacks the required capability scope.
- `404`: Unknown `model` name. GET /v1/models lists the menu, published in the `corent-` spelling; older spellings of the same model are still accepted, so this means the name matches no model at all.
- `422`: Prompt not allowed, or request failed validation.
- `429`: Rate limit, concurrency, or daily spend cap reached.
- `502`: Every eligible provider failed; try again.
- `503`: No provider currently available for this request.

---

[API](https://skmtc.dev/corent/apis/corent-api.md) · [All operations](https://skmtc.dev/corent/apis/corent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/corent/apis/corent-api/revisions/57168ff53efe?raw)
