gpt-image-2
gpt-image-2- OpenAI
- Image
Overview
- Model developer
- OpenAI
- Supported protocols
scenepond-task
Call this model
Create an API key, add account credit, and confirm this model is available to your key before sending a request.
Copy the complete model reference, including every published protocol, for your AI assistant.
/v1/tasksRequest parameters
| Parameter | Required | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
model | Required | string | Use this exact public model ID. Constraints
| ||||||||||||||||||||||||||||||||||||||||||||
parameters | Required | object | Generation parameters for this model. | ||||||||||||||||||||||||||||||||||||||||||||
These fields apply when parameters is supplied. A required child does not make its optional parent required.
| |||||||||||||||||||||||||||||||||||||||||||||||
Request notes
- Images and videos use the same task API. Select a model; channel selection is automatic.
- Authenticate every request with Authorization: Bearer and your Scenepond API key. Keep the key on your server.
- Submit once, save task_id, then poll until succeeded or failed. Download results from the artifacts endpoint.
- Creation returns after upstream acceptance. A synchronous upstream may finish before the task ID is returned.
- Do not automatically resubmit a timed-out POST. It may already have created a billable task.
- Parameters and limits vary by model. Only the fields listed for this model are accepted.
Minimum request
1curl --fail-with-body -X POST "https://open.scenepond.ai/v1/tasks" \
2 -H "Authorization: Bearer $SCENEPOND_API_KEY" \
3 -H "Content-Type: application/json" \
4 --data-binary @- <<'JSON'
5{
6 "model": "gpt-image-2",
7 "parameters": {
8 "prompt": "A cat walking on a quiet beach",
9 "count": 1,
10 "size": "1024x1024",
11 "quality": "low"
12 }
13}
14JSONRun this example in a shell with cURL installed. Set SCENEPOND_API_KEY before running.
Illustrative responses
Response examples show the structure only. IDs, URLs, and values are placeholders.
Submission response
1{
2 "task_id": "task_EXAMPLE",
3 "model": "gpt-image-2",
4 "status": "queued",
5 "progress": 0,
6 "created_at": 1700000000,
7 "finished_at": 0,
8 "error": null,
9 "links": {
10 "self": "/v1/tasks/task_EXAMPLE",
11 "artifacts": "/v1/tasks/task_EXAMPLE/artifacts"
12 }
13}Completed task status
1{
2 "task_id": "task_EXAMPLE",
3 "model": "gpt-image-2",
4 "status": "succeeded",
5 "progress": 100,
6 "created_at": 1700000000,
7 "finished_at": 1700000060,
8 "error": null,
9 "links": {
10 "self": "/v1/tasks/task_EXAMPLE",
11 "artifacts": "/v1/tasks/task_EXAMPLE/artifacts"
12 }
13}Artifact listing
1{
2 "task_id": "task_EXAMPLE",
3 "artifacts": [
4 {
5 "key": "image_0",
6 "type": "image",
7 "content_url": "https://open.scenepond.ai/v1/tasks/task_EXAMPLE/artifacts/image_0/content"
8 }
9 ]
10}Follow-up requests
2. Check task status
Poll every few seconds until succeeded or failed.
1curl --fail-with-body -X GET "https://open.scenepond.ai/v1/tasks/$SCENEPOND_TASK_ID" \
2 -H "Authorization: Bearer $SCENEPOND_API_KEY"Run this example in a shell with cURL installed. Set SCENEPOND_API_KEY before running.
3. Get the results
After succeeded, list artifacts and download each content_url. Keep signed URLs private.
1curl --fail-with-body -X GET "https://open.scenepond.ai/v1/tasks/$SCENEPOND_TASK_ID/artifacts" \
2 -H "Authorization: Bearer $SCENEPOND_API_KEY"Run this example in a shell with cURL installed. Set SCENEPOND_API_KEY before running.
Use it in your application
Use the task API in your application to submit generation requests and retrieve results by task ID.
Model access and request limits depend on your account, API key, and service configuration.