gpt-image-2 API
gpt-image-2 from OpenAI is listed as an image service. Check its exact task before integration: generation, editing and image processing do not share the same inputs or pricing.
PreparingService type
1 request · The final usage amount follows the reported result and the permitted request options.
The usage rate is fixed at request admission. Reported consumption determines the final usage amount.
- API model ID
- gapgpt-gpt-image-2-9ba2827204
- Model developer
- OpenAI
- Service type
- Image generation or processing
- Current availability
- Preparing
Model features
No additional gateway capabilities have been confirmed for this model.
What is gpt-image-2?
Use the public identifier gapgpt-gpt-image-2-9ba2827204 for gpt-image-2 in ServerNet. The gateway uses this identifier to select the configured route; the developer is OpenAI.
For gpt-image-2, use the listed model ID and endpoint instead of assuming every GPT parameter is supported. Compare both input and output prices for your expected request size.
Where to use gpt-image-2
- Evaluate gpt-image-2 on representative visual tasks before selecting it.
- Check dimensions, input image requirements and output format for gpt-image-2.
- Keep the original prompt and task settings so visual results can be reproduced.
How to evaluate this model
For gpt-image-2, compare the accepted input format and billing basis with alternatives in the same operation.
Before you integrate
- Use a representative test set and check factual accuracy, format and failure cases.
- Keep the first request bounded. Follow the operation-specific example and its API scope.
- Record response time and usage in your own environment before setting a production budget.
Image workflows
Check accepted inputs, dimensions and the rate unit before generating.
Compare models ↗Build your integration
A native image route needs a verified input schema, resolution bounds and a price for every billable option. The supported task and route will be documented here when they are ready.
Inputs and service limits
An image model listing does not enable image input on the chat endpoint. Resolution, number of images and editing inputs can change the cost. Do not assume a token price covers the native operation.
Image, audio, video and other native services can use different billing units. A token tariff is not a valid substitute. Sale opens only after the execution path and bounded billing contract are verified.
Accepted ServerNet API parameters
Gateway request contract: 2026-10-11. These fields and defaults are enforced by /v1/inference; availability is shown above. Text byte limits are measured as UTF-8 bytes.
| Parameter | Type | Required | Declared constraints |
|---|---|---|---|
prompt | string | Yes | Minimum length: 1
Maximum length: 4096
Maximum UTF-8 bytes: 4096
|
size | string | No | Default: 1024x1024
Values: 1024x1024
|
n | integer | No | Minimum: 1
Maximum: 1
Default: 1
|
quality | string | No | Default: low
Values: low
|
output_format | string | No | Default: png
Values: png, jpeg, webp
|
Connect to gpt-image-2 API
Enable ai:native on your key and ai:models:read to check availability. Set SERVERNET_API_KEY in your server environment. Change the idempotency key for each new request; keep it unchanged only for an identical retry.
This example documents the request format. Send it only after this model appears in GET /v1/models.
curl https://servernet.cloud/v1/inference \
-H "Authorization: Bearer $SERVERNET_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: CHANGE_FOR_EACH_NEW_REQUEST' \
-d '{
"model": "gapgpt-gpt-image-2-9ba2827204",
"size": "1024x1024",
"n": 1,
"quality": "low",
"output_format": "png",
"prompt": "Hello from ServerNet"
}'import json, os, urllib.request
from uuid import uuid4
body = json.loads("{\n \"model\": \"gapgpt-gpt-image-2-9ba2827204\",\n \"size\": \"1024x1024\",\n \"n\": 1,\n \"quality\": \"low\",\n \"output_format\": \"png\",\n \"prompt\": \"Hello from ServerNet\"\n}")
request = urllib.request.Request(
"https://servernet.cloud/v1/inference",
data=json.dumps(body).encode(),
headers={
"Authorization": "Bearer " + os.environ["SERVERNET_API_KEY"],
"Content-Type": "application/json",
"Idempotency-Key": str(uuid4()),
},
method="POST",
)
with urllib.request.urlopen(request) as response:
print(json.load(response))import { randomUUID } from 'node:crypto';
const response = await fetch('https://servernet.cloud/v1/inference', {
method: 'POST',
headers: {
Authorization: 'Bearer ' + process.env.SERVERNET_API_KEY,
'Content-Type': 'application/json',
'Idempotency-Key': randomUUID(),
},
body: JSON.stringify({
"model": "gapgpt-gpt-image-2-9ba2827204",
"size": "1024x1024",
"n": 1,
"quality": "low",
"output_format": "png",
"prompt": "Hello from ServerNet"
}),
});
if (!response.ok) throw new Error('HTTP ' + response.status);
console.log(await response.json());Use the same Idempotency-Key when retrying an identical request. Successful responses are replayed without a second charge for 24 hours. Do not automatically retry when x-should-retry:false is present. The key is shown once. Store it in a server environment variable. Keep it out of browser code, GitHub and logs.
Keys, budgets and usage reportsFrequently asked questions
Is gpt-image-2 available through ServerNet?
gpt-image-2 is currently unavailable for API use. A catalogue listing does not activate billing or access. Choose an available related model or check this page again after the route is verified.
Which model ID and API endpoint should I use for gpt-image-2?
This model needs a native execution route. A chat, embedding or reranking example would not execute the advertised task. Its public page remains a catalogue reference until the route and metering are ready.
How is gpt-image-2 usage charged?
Image, audio, video and other native services can use different billing units. A token tariff is not a valid substitute. Sale opens only after the execution path and bounded billing contract are verified.
What should I check before using gpt-image-2 in production?
An image model listing does not enable image input on the chat endpoint. Resolution, number of images and editing inputs can change the cost. Do not assume a token price covers the native operation.