Generation

Create an image generation task

Validates the request, charges credits, and submits the job before responding; most models render asynchronously. Poll GET /api/v1/tasks/{taskId}. On Pro and Ultra, flagship image models can be covered by the daily plan allowance (costCredits: 0).

post/api/v1/images

Request

  • Base URL: https://viewmax.studio
  • URL: https://viewmax.studio/api/v1/images
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Optional. 1–200 visible ASCII characters, no spaces (otherwise 400). A repeated key for the same account, on any create endpoint, returns the task the first request created with its original costCredits and charges nothing; the body is not compared. Without it, every request creates and charges a new task.

Request body

modelstring required

Model id from GET /api/v1/models?type=image.

promptstring required
scene'text-to-image' | 'image-to-image'

Default: image-to-image when image_urls is non-empty, else text-to-image.

image_urlsstring[]

Required (at least one) for image-to-image. ViewMax sets no count limit; the model provider may.

Response

Task created, or the existing task for a repeated Idempotency-Key.

code0 required
message'ok' required

Changes

No recorded changes to this operation across all 1 revision of this API.