Skip to main content
POST
https://aigenstudio.app/api/v1
/
image
/
generate
Image Generation
curl --request POST \
  --url https://aigenstudio.app/api/v1/image/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "input": {
    "prompt": "Minimal ecommerce hero image of a glass skincare bottle on white marble."
  }
}
'
{
  "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
input
object
required
options
object
output
object
webhook_url
string<uri>

Response

Existing idempotent job returned.

job
object
required
remaining_paid_credits
integer
required
request_id
string
required