OpenAI text, embeddings, and image APIs
Choose an Official Group model and use streaming, caching, and the playground.
Use an available model from the Official Group catalog with an Official Group API key. Each group has its own prices.
Setup and model selection
Use the base URL https://app.apipool.dev/v1 and Authorization: Bearer YOUR_API_KEY. Create a key in the dashboard and choose your Official Group key on the model page to try the playground at the model rate.
| Type | Model | Recommended endpoint |
|---|---|---|
| Text and reasoning | GPT‑6.1 Sol / Terra, GPT‑6 Astra / Sol / Luna, GPT‑5.6 Sol / Terra / Luna | /v1/responses |
| Text and reasoning | GPT‑5.5, GPT‑5.4 / Mini / Nano, GPT‑5.2, GPT‑5.1, GPT‑5 / Mini / Nano | /v1/responses or Chat Completions |
| Specialized reasoning and coding | GPT‑5 Pro, GPT‑5.2 Pro, GPT‑5.4 Pro, GPT‑5.3 Codex, o3-pro | /v1/responses |
| Chat compatibility | GPT‑4.1, GPT‑4.1 Mini, GPT‑4o, o3 | /v1/chat/completions |
| Text embeddings | text-embedding-3-small, text-embedding-3-large, text-embedding-ada-002 | /v1/embeddings |
| Images | GPT Image 1.5 | /v1/images/generations, /v1/images/edits |
Check availability in the catalog. Announced end-of-support dates are December 11, 2026 for GPT‑5, Mini, Nano, and Pro, plus o3 and o3-pro, January 14, 2027 for GPT‑4.1, GPT‑4.1 Mini, and GPT‑4o, and April 1, 2027 for GPT‑5.1, GPT‑5.3 Codex, and GPT‑5.4 Nano. For new projects, test a model that will remain in support for your deployment.
Responses
curl https://app.apipool.dev/v1/responses \
-H "Authorization: Bearer $APIPOOL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-6.1-terra","input":"Explain vector search in three sentences.","max_output_tokens":512,"stream":false}'input accepts text or a message array. With stream: true, read SSE through response.completed and keep final usage. max_output_tokens covers reasoning and visible output. A low limit can truncate the response.
Use the standard speed tier. Omit service_tier or use auto, default, or standard. Output limits vary by model. Keep explicit message history and use foreground requests. Background tasks, stored conversations, previous_response_id, and conversation are unavailable.
Declare functions with tools: [{"type":"function","name":"function_name","description":"Description","parameters":{"type":"object","properties":{}}}]. Your application executes tool calls and sends their results in the next request. Use Responses for GPT‑5.6 and GPT‑6 tools. Built-in image generation, web search, file search, and code execution are unavailable.
Chat Completions
curl https://app.apipool.dev/v1/chat/completions \
-H "Authorization: Bearer $APIPOOL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4.1-mini","messages":[{"role":"user","content":"Hello"}],"stream":true,"stream_options":{"include_usage":true}}'Set stream_options.include_usage: true for streaming and read through [DONE]. Sampling parameters vary by reasoning model. You can start with default temperature and top_p. These text models do not provide audio output or live voice.
Image understanding
The Official Group playground for gpt-4.1 and gpt-6.1-terra accepts one PNG or JPEG up to 512 KiB. Preview or remove it before submission.
The API example uses GPT‑6.1 Terra with Responses. GPT‑4.1 Chat messages use text and image_url blocks. Image inputs count toward input tokens and the model returns text.
{
"model": "gpt-6.1-terra",
"input": [
{
"role": "user",
"content": [
{
"type": "input_text",
"text": "Describe the contents of this image."
},
{
"type": "input_image",
"image_url": "data:image/png;base64,BASE64_IMAGE"
}
]
}
],
"max_output_tokens": 512
}Caching and long context
GPT‑5.6, GPT‑6, and GPT‑6.1 accept the following Responses setting.
{ "prompt_cache_options": { "ttl": "12h", "mode": "implicit" } }TTL accepts 30m (default) and 12h. For mode: "explicit", add prompt_cache_breakpoint to the input_text block in the fixed prefix to enable cache reads and writes. A stable prefix needs at least 1,024 tokens. Chat Completions does not accept these options.
usage.input_tokens includes cache reads and writes. Subtract both from total input to get ordinary input. Bill writes at their respective rates using cache_write_tokens_details.ttl_30m_tokens and ttl_12h_tokens without counting the total again.
For models with a long-context tier, requests above 272,000 input tokens use the long-context rate for the entire request. Exactly 272,000 uses standard rates. The model page lists input, cache reads, both cache-write TTLs, and output. Cached input uses the standard input rate where no separate rate applies.
Embeddings
curl https://app.apipool.dev/v1/embeddings \
-H "Authorization: Bearer $APIPOOL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"text-embedding-3-small","input":"Text to index","encoding_format":"float"}'Read data[].embedding and usage.prompt_tokens. Charges use input tokens only. The playground displays the actual dimensions, values, and usage.
GPT Image 1.5
The announced end-of-support date for GPT Image 1.5 is December 1, 2026. See GPT Image 2.6 for another image model.
curl https://app.apipool.dev/v1/images/generations \
-H "Authorization: Bearer $APIPOOL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-image-1.5","prompt":"A blue ceramic cup on a white table","size":"1:1","quality":"low","n":1}'Image requests create an asynchronous task. Use GET /v1/tasks/{task_id} until it completes, then save the results before their URLs expire.
size accepts 1:1, 3:2, or 2:3. quality accepts auto, low, medium, or high. Set n from 1 to 4 and omit resolution. For edits, use image_urls or upload multipart image files to /v1/images/edits. Include up to 15 references. A mask needs an alpha channel and must match the first reference dimensions. Use PNG or WebP for a transparent background. Extra moderation via nsfw_check is unavailable.
Pricing and limits
Official Group prices below are in US dollars per million tokens and include the group discount. Check each model page for long-context and cache-write prices.
| Model | Input | Cached input | Output | Output limit |
|---|---|---|---|---|
gpt-4.1 | $1.7 | $0.425 | $6.8 | 16000 |
gpt-4.1-mini | $0.34 | $0.085 | $1.36 | 16000 |
gpt-4o | $2.125 | $1.0625 | $8.5 | 16000 |
gpt-5 | $1.0625 | $0.10625 | $8.5 | 16000 |
gpt-5-mini | $0.2125 | $0.02125 | $1.7 | 16000 |
gpt-5-nano | $0.0425 | $0.00425 | $0.34 | 16000 |
gpt-5-pro | $12.75 | $12.75 | $102 | See API response |
gpt-5.1 | $1.0625 | $0.10625 | $8.5 | 16000 |
gpt-5.2 | $1.4875 | $0.14875 | $11.9 | 16000 |
gpt-5.2-pro | $17.85 | $17.85 | $142.8 | 16000 |
gpt-5.3-codex | $1.4875 | $1.4875 | $11.9 | See API response |
gpt-5.4 | $2.125 | $0.2125 | $12.75 | 12800 |
gpt-5.4-mini | $0.6375 | $0.06375 | $3.825 | 16000 |
gpt-5.4-nano | $0.17 | $0.017 | $1.0625 | 16000 |
gpt-5.4-pro | $25.5 | $25.5 | $153 | 12800 |
gpt-5.5 | $4.25 | $0.425 | $25.5 | 12800 |
gpt-5.6-luna | $0.17 | $0.017 | $1.02 | 128000 |
gpt-5.6-sol | $3.4 | $0.34 | $17 | 12800 |
gpt-5.6-terra | $1.7 | $0.17 | $10.2 | 12800 |
gpt-6-astra | $8.5 | $0.85 | $42.5 | 12800 |
gpt-6-luna | $0.085 | $0.0085 | $0.425 | 12800 |
gpt-6-sol | $1.7 | $0.17 | $8.5 | 12800 |
gpt-6.1-sol | $1.7 | $0.085 | $8.5 | 12800 |
gpt-6.1-terra | $0.85 | $0.0425 | $4.25 | 12800 |
o3 | $1.7 | $1.7 | $6.8 | See API response |
o3-pro | $17 | $17 | $68 | See API response |
text-embedding-3-small | $0.017 | — | — | No text output |
text-embedding-3-large | $0.1105 | — | — | No text output |
text-embedding-ada-002 | $0.085 | — | — | No text output |
GPT Image 1.5 rates per million tokens are US$4.25 / US$1.0625 / US$6.80 / US$1.70 / US$8.50 / US$27.20 for text input, cached text input, image input, cached image input, text output, and image output respectively. Actual usage varies with dimensions, quality, and references.
Troubleshooting
- Unavailable model or HTTP 404. Check the catalog, exact ID, and API key group.
- HTTP 400. Check parameters against the endpoint example. Use Responses for Pro and Codex and the Images API for image generation.
- Insufficient balance. Add funds before submitting a new request.
- HTTP 429 or timeout. Save
X-APIPool-Request-Id. Check an existing image task before retrying. - Stream disconnect. Treat the result as incomplete when the terminal event is missing. Retain the request ID for support.