Skip to main content

Generation with Advanced Custom

Edit images or generate videos from a character using custom prompts. This works the same as the V1 Generation with Advanced Custom, but uses a character ID instead of an image URL.


Request

https://open.eternalai.org/v2/base/generate
Edit Image
curl --location 'https://open.eternalai.org/v2/base/generate' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <YOUR_API_KEY>' \
--data '{
"images": ["6870"],
"prompt": "Change the outfit to a sporty top",
"type": "image"
}'
Generate Video
curl --location 'https://open.eternalai.org/v2/base/generate' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <YOUR_API_KEY>' \
--data '{
"images": ["6870"],
"prompt": "The person waves and smiles",
"type": "video",
"duration": 4
}'
ParameterTypeRequiredDescription
imagesarrayYesAn array containing a single character ID (as a string). Only character IDs are accepted — image URLs and base64 are not supported in V2.
promptstringYesUser-defined instruction describing how the character's image should be transformed.
typestringYesSpecifies the generation output type. Allowed values are "image" (static result) or "video" (animated result).
durationintNo

Duration of the output when the type is video.
Range: 1 - 5

audiobooleanNo

Only used when the type field is video.
Default: true

qualitystringNoImage edit quality. "low" (default) or "high". Only applies when type is "image". When set to "high", pricing is 2x.
warning

The images field in V2 only accepts character IDs. Image URLs and base64-encoded images are not supported. Use the Characters API to create a character first.

Response Example (Image)

{
"request_id": "4860079c-90c2-4a96-b715-d521712ce21d",
"status": "pending",
"result": "",
"progress": 0,
"credits_remaining": 629.32
}

Response Example (Video)

{
"status": 1,
"data": {
"request_id": "453ead2d-a09f-44fb-81df-b37dac9e401a",
"status": "pending",
"result": "",
"progress": 0
},
"request_id": "453ead2d-a09f-44fb-81df-b37dac9e401a",
"credits_remaining": 627.8
}
ParameterTypeDescription
request_idstringUnique identifier of the request to get result.
statusstringCurrent status of the request (e.g. pending, success).
resultstringResult data returned after processing.
progressintegerProcessing progress percentage.
credits_remainingnumberRemaining credits after this request.

Poll for Result

Periodically call the following API with the request_id obtained from the previous step to poll for the result.

https://open.eternalai.org/v2/poll-result/{REQUEST_ID}
curl --location 'https://open.eternalai.org/v2/poll-result/$REQUEST_ID'

On success, the response contains a result_url field — a signed URL for retrieving the generated image or video.

{
"request_id": "4860079c-90c2-4a96-b715-d521712ce21d",
"status": "success",
"progress": 99,
"result_url": "https://cdn.eternalai.org/agent_data/2026/03/31/img-generated-4860079c-90c2-4a96-b715-d521712ce21d_1774934351.jpg",
"effect_type": "image",
"encrypted_aes_key": ""
}
ParameterTypeDescription
request_idstringUnique identifier for the generation request.
statusstringFinal status of the request (e.g. success, pending, failed).
progressintegerProgress indicator of the generation process.
result_urlstringURL of the generated output image or video.
effect_typestringType of generation performed (e.g. image, video).

Generated Output & Quality Comparison

Input Character: Astrid (id: 6870)

Output — quality: "low" (default)

Output — quality: "high"

Video Generation Output

Input Character: Astrid (id: 6870)

Output Video — "The person waves and smiles"