GPT-6.1 Sol API with the OpenAI SDK: $1 / $5 per 1M Tokens
If your code already talks to OpenAI through the official SDK, moving a feature to GPT-6.1 Sol takes two edits: a new base_url and the model id gpt-6.1-sol. Keeping its cost predictable takes four habits: start reasoning_effort at low, cap max_tokens, stream long answers, and log what each request actually cost. The price is $1 per 1M input tokens, $5 per 1M output tokens and $0.05 per 1M cached input tokens, half of OpenAI's $2 / $10 / $0.10 list.
Disclosure up front: the numbers below come from apimodels.app, which is the API I work on. apimodels.app is a multi-model API gateway: one API key and one OpenAI-compatible endpoint for image, video, audio and language models. Timing and failure figures are measured on our production traffic over the last 7 days (sample size not disclosed) and rounded; benchmark figures are OpenAI's own.
What changes in your code, and what does not
GPT-6.1 Sol is OpenAI's 29 September 2026 upgrade to the Sol tier of GPT-6: a 1.05M-token context window, up to 128K output tokens, text and image input, and a knowledge cutoff of 30 April 2026. Both /v1/chat/completions and /v1/responses serve it, with streaming, function calling and structured outputs.
Three details to check:
- There is no
nonereasoning level. GPT-6.1 Sol acceptslow,medium(the default),high,xhighandmax. Code written for GPT-6 Sol that sendsreasoning_effort: "none"should sendlowinstead. - Aliases do not move on their own. The bare id
gpt-6.1resolves togpt-6.1-sol, whilegpt-6still points at GPT-6 Sol, so nothing gets upgraded behind your back. - Streamed tool calls arrive one per turn. On streamed Chat Completions requests with tools, apimodels.app currently sends
parallel_tool_calls: falsefor this model, so agent loops take more turns. Non-streaming calls are not affected.
Among siblings, gpt-6-sol costs the same $1 / $5 per 1M tokens with cached input at $0.10, while OpenAI reports GPT-6.1 Sol ahead on DeepSWE v1.1 (75.2% vs 68.8%). For bulk tagging and extraction, gpt-6-luna at $0.09 / $0.45 is the better-sized tier.
A request that reports its own cost
Every response carries an x-apimodels-request-id header. Non-streaming responses also carry x-apimodels-cost: the amount deducted, in US dollars, after any account discount. Streaming responses carry only the id, because the amount is settled with the last chunk; GET /v1/records/{id} returns it afterwards, and that lookup is free. Example below (syntax-checked, written against our docs, not run for this post):
import os
import requests
from openai import OpenAI
KEY = os.environ["APIMODELS_API_KEY"]
client = OpenAI(
api_key=KEY,
base_url="https://api.apimodels.app/v1",
max_retries=0, # retry in your own code, see the failures section
)
# 1) Non-streaming: the charge comes back with the response
raw = client.chat.completions.with_raw_response.create(
model="gpt-6.1-sol",
reasoning_effort="low",
max_tokens=2000, # reasoning and answer share this allowance
messages=[{"role": "user", "content": "Summarize this changelog in three bullets: ..."}],
)
body = raw.http_response.json()
if body.get("error"): # after the 95 s keep-alive a failure still arrives as HTTP 200
raise RuntimeError(body["error"])
extra = body.get("apimodels", {}) # id and cost land here when headers went out early
reply = raw.parse()
print(reply.choices[0].message.content)
print("request id:", raw.headers.get("x-apimodels-request-id") or extra.get("request_id"))
print("charged USD:", raw.headers.get("x-apimodels-cost") or extra.get("cost"))
print("usage:", reply.usage) # completion_tokens includes reasoning tokens
# 2) Streaming: keep the id now, look the charge up once it settles
raw = client.chat.completions.with_raw_response.create(
model="gpt-6.1-sol",
reasoning_effort="medium",
max_tokens=8000,
stream=True,
stream_options={"include_usage": True},
messages=[{"role": "user", "content": "Draft a migration plan for ..."}],
)
request_id = raw.headers.get("x-apimodels-request-id")
for chunk in raw.parse():
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
if chunk.usage:
print("\nusage:", chunk.usage)
rec = requests.get(
f"https://api.apimodels.app/v1/records/{request_id}",
headers={"Authorization": f"Bearer {KEY}"},
).json()["data"]
print(rec["settled"], rec["credits"], rec["currency"]) # settled stays False until billing finishes
Store the request id next to your own user or job id, and monthly reconciliation becomes a join instead of an estimate.
Reasoning effort is the main cost lever
Reasoning tokens never show up in the answer, but they are billed at the $5 output rate and they count toward max_tokens. Two consequences:
- Effort moves the bill more than prompt length does. Every extra 1,000 reasoning tokens adds $0.005 to a request, the same as 5,000 extra input tokens. Start at
lowfor extraction, rewriting and short answers; raise it only where you can see a quality difference. - A tight
max_tokenscan produce an empty answer. If reasoning uses the whole allowance, nothing is left for the reply. If content comes back empty, raisemax_tokensor lower the effort rather than retrying as is.
Caching is the second lever: cached input costs $0.05 per 1M tokens instead of $1.00, but only for a byte-identical prefix. Keep the system prompt and tool definitions fixed at the top and put everything that changes at the end. Passing prompt_cache_key groups requests that share a prefix; on Chat Completions, apimodels.app otherwise derives one from the conversation's first user message.
How long requests take
End-to-end time from request to last token, successful requests on both endpoints, grouped by output tokens (reasoning included):
| Output tokens | p50 (s) | p90 (s) |
|---|---|---|
| up to 500 | 8 | 13 |
| 501 to 2,000 | 16 | 34 |
| 2,001 to 8,000 | 36 | 91 |
| above 8,000 | not enough data | not enough data |
These are totals, not time to first token. Two practical points:
- Stream long answers. The 2,001 to 8,000 row has a p90 of about 90 seconds, so use
stream=Truefor any call that may write a long answer or think hard. - Check the body, not only the status. A non-streaming request that runs past about 95 seconds gets HTTP 200 headers early and is kept alive with whitespace. A later failure then arrives inside that 200, and the request id and cost move into an
apimodelsfield in the body, which is why the example reads both. Keep the SDK's default 600-second timeout; do not lower it to 30 or 60 seconds.
Failures, retries and what you pay for
Over the same 7 days, fewer than 1% of GPT-6.1 Sol requests failed for any reason. The few we saw were mostly malformed requests, for example JSON mode (response_format: {"type": "json_object"}) with no mention of the word JSON anywhere in the messages, which the model's API rejects with a 400.
Part of that is the gateway's doing. Both endpoints have more than one upstream route for this model, and if the first route returns an error before any output has reached you, the request moves to the next one automatically, streamed requests included. Failed requests are not billed; their record shows zero.
The rule that matters for retries: a client-side timeout or disconnect does not cancel the work. The generation runs to the end and is billed, and by default the OpenAI SDK retries timeouts and 5xx responses twice on its own, hence max_retries=0 in the example. Retry in your own code on 429 and 5xx, at most twice, a few seconds apart. Do not retry 400 (fix the request), 401 (key), 402 (balance) or 404 (model id). If a stream breaks on your side, look its request id up before resending.
Prices, as of October 27, 2026
Per 1M tokens, in US dollars:
| Rate | Input | Cached input | Output |
|---|---|---|---|
| GPT-6.1 Sol on apimodels.app | 1.00 | 0.05 | 5.00 |
| OpenAI list price | 2.00 | 0.10 | 10.00 |
| apimodels.app, request input above 272K | 2.00 | 0.10 | 7.50 |
| OpenAI list, request input above 272K | 4.00 | 0.20 | 15.00 |
The long-context step applies to the whole request once its input passes 272K tokens, as it does on OpenAI. Each request's charge is rounded to the nearest $0.0001, with $0.0001 as the minimum. Parameters and the full model table are in the GPT-6.1 Sol API reference, and the headers and record fields in the per-request billing docs.
A worked cost estimate
Say an in-app assistant sends a 6,000-token system prompt and tool list that stays cached, 1,500 new input tokens per request, and gets 600 output tokens back at low effort:
Cached prefix 6,000 x $0.05 / 1M = $0.0003
New input 1,500 x $1.00 / 1M = $0.0015
Output 600 x $5.00 / 1M = $0.0030
Per request $0.0048
100,000 requests a month $480
At OpenAI's list price the same traffic costs $0.0096 per request, or $960 a month. If medium effort adds 1,000 reasoning tokens per request, that is another $0.005 per request and $500 a month, so test the effort setting before launch. For long inputs, one 300,000-token review with 4,000 output tokens costs $0.63 because the long-context step applies; two 150,000-token halves with 2,000 output tokens each cost $0.32 together.
When not to use it
- Your code depends on
reasoning_effort: "none"and you cannot change it yet. Stay ongpt-6-solat the same $1 / $5 until you can. - The work is high-volume and simple, such as tagging or routing.
gpt-6-lunaat $0.09 / $0.45 per 1M tokens fits better. - You need OpenAI's Batch API or a direct OpenAI contract, for example for enterprise compliance paperwork or committed spend. Use OpenAI directly.
- Your agent needs several tool calls in one streamed turn. Send those turns without streaming, or plan for more turns.
If none of those apply, change the base_url in code you already have and run one low effort request. Its id and exact charge then appear under Records in the apimodels.app console.
Drafted with AI assistance; prices and numbers checked against our API docs and records on Oct 25, 2026.
评论
发表评论