Skip to main content

Generate Effects V2

Purpose​

Generates an effect sprite sheet asynchronously from a text description with a chosen frame count. You can optionally upload a reference image and choose the sheet's background color. This is the same feature as the V2 tab of the web app's "Generate effects" page (the default tab).

Credit cost: 3

Method and Path​

POST /public/v1/generate/effect/v2

Authentication​

See the Authentication page. Bearer token is required.

Required Headers:

Authorization: Bearer {your_api_key}

Request Fields​

Send the request as multipart/form-data.

Field NameTypeRequiredDescription
descriptionstringYesEffect description. Leading and trailing whitespace is trimmed
frameintegerYesFrames. Allowed values: 4, 9, 16
background_colorstringYesBackground color of the sheet. Allowed values: white, chroma_green, magenta, light_gray, light_purple, dark_gray
imagefileNoOptional reference image (PNG or JPEG)

See Generate Effects V1 for the background color table.

Response​

Success Response (200 OK):

{
"job_id": "uuid-string"
}
FieldTypeDescription
job_idstringUnique identifier for the created job. Use Get Job Status to retrieve results

Error / Validation Rules​

ConditionHTTP StatusError Message
Image is not a valid PNG or JPEG file400"Invalid image file"
frame value is not allowed400"frame should be one of 4, 9, 16"
Invalid API key401"Invalid API key"
Missing field or unknown enum value422Validation error

Async Job Behavior​

This endpoint creates an asynchronous job. It immediately returns a job_id, and actual effect generation occurs in the background.

Polling Method:

  1. Save the job_id received in the response
  2. Poll GET /public/v1/job/{job_id} to check status
  3. When status becomes Succeed, check results in image_urls

Status Flow: Pending → Succeed or Failed

Example Request​

cURL (without image):

curl -X POST "https://api.aetherforgeai.com/public/v1/generate/effect/v2" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "description=apply a glowing fantasy aura" \
-F "frame=9" \
-F "background_color=white"

cURL (with image):

curl -X POST "https://api.aetherforgeai.com/public/v1/generate/effect/v2" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "description=apply a neon cyberpunk effect" \
-F "frame=16" \
-F "background_color=magenta" \
-F "image=@/path/to/input.png"