AI

Start an AI image generation

Starts generating a standalone image, not tied to a template, and returns immediately. Poll the Location URL every 2 seconds or so until status is done or error; generation usually takes 10 to 60 seconds. Uses AI credits, charged only on success.

post/ai/generate

Request

  • Base URL
    https://api.dynapictures.com
  • URL
    https://api.dynapictures.com/ai/generate
  • Auth
    HTTP bearer

Request body

modelIdstring required

The AI model. The API reference lists every model with its credit cost, e.g. flux-2-pro, gemini-3.1-flash-image or gpt-image-2-med.

promptstring required

What to generate. May contain [name] tokens that refer to referenceImages.

ratio'1:1' | '3:2' | '2:3' | '16:9' | '9:16' | '4:3' | '3:4'

The aspect ratio. Supported ratios vary by model.

sourceImagestring uri

URL of a photo to edit. Leave it out for text-to-image.

Response

The job was queued.

jobUidstring required

The ID of the job. Use it to poll for the result.

status'queued' required

Always queued on a new job.

Changes

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