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 Name | Type | Required | Description |
|---|---|---|---|
| description | string | Yes | Effect description. Leading and trailing whitespace is trimmed |
| frame | integer | Yes | Frames. Allowed values: 4, 9, 16 |
| background_color | string | Yes | Background color of the sheet. Allowed values: white, chroma_green, magenta, light_gray, light_purple, dark_gray |
| image | file | No | Optional reference image (PNG or JPEG) |
See Generate Effects V1 for the background color table.
Response
Success Response (200 OK):
{
"job_id": "uuid-string"
}
| Field | Type | Description |
|---|---|---|
| job_id | string | Unique identifier for the created job. Use Get Job Status to retrieve results |
Error / Validation Rules
| Condition | HTTP Status | Error Message |
|---|---|---|
| Image is not a valid PNG or JPEG file | 400 | "Invalid image file" |
| frame value is not allowed | 400 | "frame should be one of 4, 9, 16" |
| Invalid API key | 401 | "Invalid API key" |
| Missing field or unknown enum value | 422 | Validation 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:
- Save the
job_idreceived in the response - Poll
GET /public/v1/job/{job_id}to check status - When status becomes
Succeed, check results inimage_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"