{
"model": "gpt-4o-image-generation",
"messages": [
{
"role": "user",
"content": "https://s2.loli.net/2024/02/01/QSWVdw9bX56gj7O.jpg Change the image to a realistic version"
}
]
}curl --location --request POST 'https://api.302.ai/v1/chat/completions' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gpt-4o-image-generation",
"messages": [
{
"role": "user",
"content": "https://s2.loli.net/2024/02/01/QSWVdw9bX56gj7O.jpg Change the image to a realistic version"
}
]
}'{
"id": "chatcmpl-89DIjCb6iIysUOJXs6ubiMHKXpsf0",
"object": "chat.completion",
"created": 1768198235,
"model": "gpt-4o-image-generation",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "```json\n{\n \"prompt\": \"Change the image to a realistic version\",\n \"ratio\": \"1:1\",\n \"n\": 2\n}\n```\n\n> ID: `a0eb0017-6b55-4c4c-81ee-ffe7f328c924`\n>[Data Preview](https://asyncdata.net/web/a0eb0017-6b55-4c4c-81ee-ffe7f328c924) | [Source Data](https://asyncdata.net/source/a0eb0017-6b55-4c4c-81ee-ffe7f328c924)\n\n>🕐 Queuing.\n\n>⚡ Generating..\n\n>🏃 Progress 1...20...[100](https://videos.openai.com/az/vg-assets/task_01kerd67gyf9yah7by072z9nty%2F1768198216_img_1.webp?se=2026-01-18T06%3A00%3A00Z&sp=r&sv=2024-08-04&sr=b&skoid=5e5fc900-07cf-43e7-ab5b-314c0d877bb0&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2026-01-11T10%3A03%3A32Z&ske=2026-01-18T10%3A08%3A32Z&sks=b&skv=2024-08-04&sig=hVsvDQ1dk8yLFIKPSkwzQYjpilY8XGblrKmxik1F3ZE%3D&ac=oaivgprodscus2)\n\n> ✅ Generation complete\n\n\n\n\n[Click to download](https://file.302.ai/gpt/imgs/20260112/df68878ed9e444d31e50345a794a0d17.png)\n\n\n\n[Click to download](https://file.302.ai/gpt/imgs/20260112/14a4287be945243e192638db2931210f.png)"
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 99,
"completion_tokens": 552,
"total_tokens": 651,
"prompt_tokens_details": {
"text_tokens": 92,
"cached_tokens_details": {}
},
"completion_tokens_details": {},
"claude_cache_creation_5_m_tokens": 0,
"claude_cache_creation_1_h_tokens": 0
}
}