Generate an AI Image

Queues the generation of an AI image for the eBook. Asynchronous, returns a job_id.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

POST /aiworkflow/image

Queues the generation of one AI image for the eBook — typically a chapter illustration. The call is asynchronous: it returns 202 with a job_id, and the state is tracked with GET /aiworkflow/image/{job_id}.

Consumes AI credits. If the job ends in ERROR, the credit is refunded.

📘

Authorization

Requires the account API key in the Authorization header, without the Bearer prefix.

HTTP Method & Path

POST /aiworkflow/image

Base URL: https://api-v2.pandavideo.com.br

Authentication Requirements

ItemValue
Security SchemeAPI Key
HeaderAuthorization
FormatThe raw key, without Bearer

Parameters

NameInTypeRequiredDescription
AuthorizationheaderstringYesAccount API key

Request Body

Content-Type: application/json

FieldTypeRequiredDescription
promptstringYesDescription of the image to generate
video_idstring (uuid)YesVideo the eBook belongs to
langstringNoLanguage of the eBook the image goes into
chapterintegerNoChapter the image illustrates
reference_imagesarray of stringNoUp to 5 storage paths used as visual reference
{
  "prompt": "A cold night in an expensive chalet with a broken heater",
  "video_id": "{video_id}",
  "lang": "en",
  "chapter": 1
}
⚠️

reference_images accepts at most 5 paths, and every one of them must be under your own user prefix. A path from another account is rejected.

📘

Generation model

The model is chosen by the service — there is no parameter to select it. This keeps the integration stable when the default model is updated.

Response

Success Response (202)

{ "job_id": "{job_id}", "status": "QUEUED" }
FieldTypeContent
job_idstringJob identifier — use it in GET /aiworkflow/image/{job_id}
statusstringQUEUED at creation time
⚠️

202 means queued, not ready. The image only exists once the job reaches SUCCESS.

Error Responses

  • 400: invalid payload, more than 5 reference images, or a reference path outside your prefix.
  • 401: missing or invalid API key.
  • 402: not enough AI credits.
  • 500: internal error.

Alternative — upload your own image

To use an image you already have instead of generating one, see Upload an eBook PDF — the upload_abstract_image_url action returns a signed URL for the upload.

Example Usage

cURL

curl -X POST "https://api-v2.pandavideo.com.br/aiworkflow/image" \
  -H "Authorization: {api_key}" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A cold night in an expensive chalet with a broken heater",
    "video_id": "{video_id}",
    "lang": "en",
    "chapter": 1
  }'
Body Params
string
required

Description of the image to generate.

uuid
required

Video the eBook belongs to.

string

Language of the eBook the image goes into.

integer

Chapter the image illustrates.

reference_images
array of strings
length ≤ 5

Up to 5 storage paths used as visual reference. Every path must be under your own user prefix.

reference_images
Responses

401

Missing or invalid API key.

402

Not enough AI credits.

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json