Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ruoli.dev/llms.txt

Use this file to discover all available pages before exploring further.

gpt-image-2 is OpenAI’s latest image-generation model, supporting up to 3840px on the longest side. RuoLi proxies OpenAI’s /v1/images/generations protocol directly — any OpenAI SDK or compatible client works out of the box.

Basics

FieldValue
EndpointPOST https://ruoli.dev/v1/images/generations
Token groupcodex-team (other groups return No available channel)
Sizes1K 1024x1024 1536x1024 1024x1536 · 2K 2048x2048 2048x1152 · 4K 3840x2160 2160x3840
Latency30 – 90 seconds
PricingSee the pricing page, billed per image

Examples

curl https://ruoli.dev/v1/images/generations \
  -H "Authorization: Bearer sk-YOUR-KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "An orange cat sitting on a sofa",
    "size": "3840x2160"
  }'

Request Parameters

ParamDescription
modelFixed gpt-image-2
promptImage description, Chinese or English
nCount, 1 – 10, default 1
sizeOne of the 7 sizes in Basics
qualitystandard · hd · medium
response_formatb64_json (default) · url. 4K base64 ~8MB — use url for bandwidth-sensitive cases

Common Errors

ErrorFix
No available channelSwitch token group to codex-team
503 ... /images/generationsUse /v1/images/generations — not /chat/completions
Invalid sizePick one of the 7 sizes in Basics
504 Gateway TimeoutRaise client timeout to 120s+
The “Test Connectivity” button in the console returns 503 — this is normal. The new-api test hits /chat/completions, but image models only accept /images/generations — a protocol mismatch. Real client calls work fine; ignore the test button’s error.