Skip to main content
POST
AI Photography

Request

  • URL: https://www.ailabapi.com/api/image/effects/ai-photography
  • Method: POST
  • Content-Type: multipart/form-data

API Information

Image requirements

  • Image format: JPEG JPG PNG WEBP
  • Image size: No more than 10 MB.
  • Image resolution: Less than 4096x4096px.

Headers

Body

Response

Response Field Handling Flow
  1. Handle Public Response Fields Parse and validate the Public Response Fields, checking the status code or response message to ensure the request is successful and error-free.
  2. Handle Business Response Fields If the Public Response Fields are valid and error-free, proceed with processing the business logic in the Business Response Fields.

Public Response Fields

Viewing Public Response Fields and Error Codes

Business Response Fields

Response Example

This API is asynchronous, please keep task_id and call Querying Async Task Results to get the final results.Asynchronous task results are valid for 24 hours. It is recommended that asynchronous task results be queried every 5 seconds.

Authorizations

ailabapi-api-key
string
header
required

API Key for authentication

Body

multipart/form-data
image
file
required

Original image.

  • Image format: JPEG JPG PNG WEBP
  • Image size: No more than 10 MB.
  • Image resolution: Less than 4096x4096px.
style_title
string
required

Style name (English only). Max 500 characters; extra text will be automatically truncated. Use standard vocabulary to pass review.

Maximum string length: 500
style_desc
string
required

Style description (English only). Max 1000 characters; extra text will be automatically truncated. Use standard vocabulary to pass review.

Maximum string length: 1000
image_size
enum<string>
default:auto

Output Image Aspect Ratio.

Available options:
auto,
1:1,
2:3,
3:2,
3:4,
4:3,
4:5,
5:4,
9:16,
16:9,
21:9

Response

200 - application/json

Success

The response is of type object.