POST
/
gpt-image-1
/
generate
Generate Image
curl --request POST \
  --url https://api.unifically.com/gpt-image-1/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>",
  "aspect_ratio": "<string>",
  "quality": "<string>",
  "image_urls": {}
}
'
{
  "code": 200,
  "data": {
    "status": "pending",
    "task_id": "4926fe1a-b7fb-4da4-b726-8f5de4a33767"
  }
}

Basic Request

curl --location 'https://api.unifically.com/gpt-image-1/generate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
    "prompt": "example prompt"
}'

Generate with Reference Images

curl --location 'https://api.unifically.com/gpt-image-1/generate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
    "prompt": "Make them hug",
    "image_urls": [
        "https://upload.wikimedia.org/wikipedia/en/thumb/5/5c/Mario_by_Shigehisa_Nakaue.png/250px-Mario_by_Shigehisa_Nakaue.png",
        "https://upload.wikimedia.org/wikipedia/en/d/d4/Donkey_Kong_character.png"
    ]
}'

Parameters

Required

prompt
string
required
Description of the image to generate

Optional

aspect_ratio
string
Image aspect ratioOptions: "1:1", "2:3", "3:2"
quality
string
Image quality levelOptions: "low", "medium", "high"
image_urls
array of strings
Array of image URLs to use as reference. Provide publicly accessible image URLs.Example: ["https://example.com/image1.jpg", "https://example.com/image2.png"]

Response

code
number
default:"200"
HTTP status code (200 for success)
data
object
Response data
{
  "code": 200,
  "data": {
    "status": "pending",
    "task_id": "4926fe1a-b7fb-4da4-b726-8f5de4a33767"
  }
}
Use the task_id to check generation status. See Get Task.

Notes

  • Streamed requests are the main option for this model
  • Non-stream requests are not recommended
  • Replace YOUR_API_KEY with your actual API key