GPT Image 1

  • Price $0.03

Here's how you can use curl to request. You must replace YOUR_API_KEY with your actual API key. Streamed requests are the main option for this model, non-stream are not recommended.

Generate 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"
}'

// for images
{
  "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"
  ]
}

// Available Optional params
"aspect_ratio": "1:1", "2:3", "3:2"
"quality": "low", "medium", "high"
Fetch status
curl --location 'https://api.unifically.com/gpt-image-1/status/4926fe1a-b7fb-4da4-b726-8f5de4a33767' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json'
Response
{
    "code": 200,
    "data": {
        "task_id": "4926fe1a-b7fb-4da4-b726-8f5de4a33767",
        "status": "completed",
        "output": {
            "image_url": "resulturl"
        },
        "error": {}
    }
}

{
    "code": 200,
    "data": {
        "task_id": "4996fe1a-b7fb-4da4-b726-8f5de4a33767",
        "status": "processing", // or "failed"
        "output": {},
        "error": {}
    }
}

Last updated