Skip to main content
POST
https://aigenstudio.app/api/v1
/
scene
/
create
AI Background
curl --request POST \
  --url https://aigenstudio.app/api/v1/scene/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "object": {
    "image_url": "https://client.example/images/perfume-001.jpg",
    "external_id": "perfume-001"
  },
  "scene": {
    "prompt": "Premium bathroom shelf with soft morning light."
  }
}
'
{
  "job": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "sandbox": true,
    "total_results": 123,
    "credits_reserved": 123,
    "created_at": "2023-11-07T05:31:56Z",
    "completed_results": 123,
    "failed_results": 123,
    "updated_at": "2023-11-07T05:31:56Z",
    "completed_at": "2023-11-07T05:31:56Z"
  },
  "remaining_paid_credits": 123,
  "request_id": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string
required

Stable key for safely retrying one logical create request.

Required string length: 8 - 160
Pattern: ^[A-Za-z0-9._:-]+$
X-Request-Id
string

Optional client correlation id. AI Gen Studio also returns request_id.

Maximum string length: 160

Body

application/json
object
object
required
scene
object
required
aspect_ratio
enum<string>
default:1:1
Available options:
1:1,
4:5,
9:16,
16:9,
3:2,
2:3
placement_type
enum<string>
default:product
Available options:
product,
person,
object
preference
object
output
object
webhook_url
string<uri>

Response

Existing idempotent job returned.

job
object
required
remaining_paid_credits
integer
required
request_id
string
required