OpenAI: GPT Image 2

openai/gpt-image-2
vision
MODALITIES
INPUT PRICE
OUTPUT PRICE
CONTEXT
4.1K
RELEASED
ProviderUptimeChat
5.00(1)$0.0100/call
$0.0150/call

Capabilities

Input modalities
textimage
Output modalities
image
Features
vision
1

Get API Key

Create an API key from the Keys page, then set it as an environment variable:

export ONLIST_API_KEY=sk-...
2

Make your first request

Endpoints

POSThttps://onlist.io/v1/images/generations
Request Headers
Authorization:Bearer $ONLIST_API_KEY
Content-Type:application/json
Model:openai/gpt-image-2

Code samples

curl https://onlist.io/v1/images/generations \
  -H "Authorization: Bearer $ONLIST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "model": "openai/gpt-image-2",
       "prompt": "A white siamese cat",
       "n": 1,
       "size": "1024x1024"
     }'

Replace $ONLIST_API_KEY with the API key from your Keys page.

Authentication

All requests must include an Authorization: Bearer <TOKEN> header. Generate keys from the Keys page; keys can be scoped to specific models, groups, IP ranges, and rate limits.

Supported parameters

NameTypeDescription
vision

These are the request parameters this model accepts. Parameter semantics follow the OpenAI Chat Completions specification.