Request
- URL:
https://www.ailabapi.com/api/image/effects/ai-anime-generator - Method:
POST - Content-Type:
multipart/form-data
Image requirements
- Image format:
JPEGPNGJPGBMPWEBP - Image size: No more than 10 MB.
- The input image dimensions should be greater than or equal to 256x256 pixels and less than or equal to 5760x3240 pixels. The short side of the output image will be 1536 pixels. If the ratio of the long side to the short side of the input image is less than or equal to 1.5:1, the original aspect ratio will be maintained. If this ratio is greater than 1.5:1, adaptive cropping will be applied to achieve an output aspect ratio of 1.5:1.
Headers
| Field | Required | Type | Description |
|---|---|---|---|
ailabapi-api-key | YES | string | Application API KEY. Get API KEY |
Body
| Field | Required | Type | Scope | Default | Description |
|---|---|---|---|---|---|
task_type | YES | string | async | async | “async: Asynchronous tasks. |
image | YES | file | |||
index | YES | integer | 0, 1, 2, 3, 4, 5, 6, 7, 8 | 0 | 0`: Vintage Comic.`, 1: 3D Fairy Tale., 2`: Two-dimensional (2D).`, 3: Refreshing and Elegant., 4`: Future Technology.`, 5: Traditional Chinese Painting Style., 6`: General in a Hundred Battles.`, 7: Colorful Cartoon., “8: Graceful Chinese Style. |
Response
Public Response Fields
Viewing Public Response Fields and Error CodesBusiness Response Fields
| Field | Type | Scope | Description |
|---|---|---|---|
task_type | string | async | Task Type. “async: Asynchronous tasks. |
task_id | string | Asynchronous task ID. Please use this field when calling the Querying Async Task Results API. |
Response Example
Querying Async Task Results Response
Public Response Fields
Viewing Public Response Fields and Error CodesBusiness Response Fields
| Field | Type | Scope | Description |
|---|---|---|---|
task_status | integer | 0, 1, 2 | Asynchronous task status. 0`: The task is queued.` 1: Asynchronous processing. “2: Processing was successful. |
data | object | The content of the result data returned. | |
+result_url | string | Result URL address. |
Response Example
Sample Code
Authorizations
API Key for authentication
Body
Task Type.
"async"
Cartoon effect. <li>0: Vintage Comic.</li> <li>1: 3D Fairy Tale.</li> <li>2: Two-dimensional (2D).</li> <li>3: Refreshing and Elegant.</li> <li>4: Future Technology.</li> <li>5: Traditional Chinese Painting Style.</li> <li>6: General in a Hundred Battles.</li> <li>7: Colorful Cartoon.</li> <li>8: Graceful Chinese Style.</li>
Response
Success
The response is of type object.

