OpenAI Responses API Setup With Ultrafast Mode: When service_tier=”ultrafast” Pays

Ultrafast is one request parameter, service_tier="ultrafast", on gpt-6.1-sol or gpt-6-astra, and OpenAI’s Ultrafast guide says it is “available to all API users”, with no separate model or approval. The same guide, checked on November 12, 2026, calls it “the fastest service tier in the OpenAI API”, and the pricing page, checked on November 12, 2026, lists it at $60 input and $300 output per million tokens for Astra and $12 and $60 for Sol, six times Standard. The API changelog entry for Astra Ultrafast is dated September 29, 2026 and describes the mode as reducing the time between generated output tokens, so long streamed answers should gain most. The steps below include a timing harness (Step 6) that produces your own latency number, and a cost grid after Step 9 that shows what six times the Standard price adds to a real workload.

Google · Preferred Sources

Don't miss new tech stories on Google

Add Tech Insider once in the Google app and our stories appear in your news suggestions.

Add Now

One parameter, two models, and the tiers around it

OpenAI’s docs list Fast mode and Ultrafast mode side by side under Performance and quality in the Production guides, so read both before choosing a route’s tier. Ultrafast sits beside the Standard, Fast, Flex and Batch tiers. Batch is discounted 50% against synchronous calls, completes within 24 hours and takes a file of requests that you poll, per the Batch guide. The Terra model page states that “Batch and Flex prices are 50% lower than Standard”, and Flex trades some speed for a lower price on workloads that can tolerate it. The Ultrafast guide says the tier is “broadly available for GPT-6 Astra and GPT-6.1 Sol” and tells you to set the model to gpt-6-astra or gpt-6.1-sol alongside service_tier set to ultrafast.

Fast mode is not limited to Responses. As of November 12, 2026, OpenAI’s Fast mode (priority processing) guide says you can configure requests to either the Responses API or Chat Completions to use Fast mode through a request parameter or a project setting. Ultrafast is the tier this guide uses, and every Ultrafast example here goes through responses.create.

Steps 1 to 4: a project key, the SDK, a first call and one model of four

Step 1. Create a dedicated project for the work, add a payment method in your API account billing settings and keep your key out of source control. OpenAI’s help article on projects says “API usage is billed separately from your ChatGPT subscription”, so a ChatGPT plan does not pay for these calls. The rate limits guide lists a hard spend limit that enforces a monthly organization or project cap, and affected API requests return a 429 error, so set a monthly cap on the project before you run the Step 6 harness or the Step 10 retry loop. Billing and dashboard screens are covered in our GPT-6.1 Sol API setup.

echo 'export OPENAI_API_KEY="sk-proj-your-key-here"' >> ~/.zshrc
source ~/.zshrc
printf '.env\n' >> .gitignore

Store the key as OPENAI_API_KEY rather than hardcoding it. For Windows PowerShell the Quickstart shows setx OPENAI_API_KEY "your_api_key_here"; reopen the terminal afterwards so the variable is visible.

Step 2. Install the current SDK inside a virtual environment (Python) or a project folder (Node.js), then confirm which version loaded.

python3 -m venv .venv && source .venv/bin/activate
pip install --upgrade openai
python3 -c "import openai; print(openai.__version__)"

# Node.js
npm install openai
npm ls openai
node -e "import('openai').then(() => console.log('openai loads'))"

Compare the printed version with the openai-python releases page. As of November 12, 2026, the latest Python release listed there is v3.49.0, published November 10, 2026, and its notes list typed async function tools among the features. Check the same page again before you pin a version in a lockfile.

Step 3. Send the first call on Standard, with no tier set. The Python SDK is the one used through the rest of this guide; the Node.js and curl forms below do the same thing.

from openai import OpenAI

client = OpenAI()
response = client.responses.create(
    model="gpt-6.1-sol",
    input="Summarize the main risk of running a database migration during peak traffic.",
)
print(response.output_text)
// first.mjs
import OpenAI from "openai";

const client = new OpenAI();
const response = await client.responses.create({
  model: "gpt-6.1-sol",
  input: "Summarize the main risk of running a database migration during peak traffic.",
});
console.log(response.output_text);
curl https://api.openai.com/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -d '{"model": "gpt-6.1-sol", "input": "Say hello."}'

Step 4. Pick the model. Prices below are per million tokens from OpenAI’s pricing page, checked on November 12, 2026. Ultrafast prices for Astra and Sol are in the Step 9 table.

ModelIDInputCached inputOutput
GPT-6 Astragpt-6-astra$10$1$50
GPT-6.1 Solgpt-6.1-sol$2$0.10$10
GPT-6.1 Terragpt-6.1-terra$1$0.05$5
GPT-6 Lunagpt-6-luna$0.10$0.01$0.50

A short loop confirms that your key can reach each of the four model IDs before you build on one:

from openai import OpenAI, APIError

client = OpenAI(timeout=30.0, max_retries=0)
for model_id in ("gpt-6-astra", "gpt-6.1-sol", "gpt-6.1-terra", "gpt-6-luna"):
    try:
        r = client.responses.create(model=model_id, input="Reply with OK.")
        print(model_id, "ok:", r.output_text)
    except APIError as e:
        print(model_id, "failed:", type(e).__name__)

The Sol model page lists a 1,050,000-token context window, 922,000 maximum input tokens, 128,000 maximum output tokens, an April 30, 2026 knowledge cutoff, function calling, web search, file search, computer use, and US and EU data residency. The Astra model page gives the same 1,050,000-token window, 128,000 maximum output tokens and April 30, 2026 cutoff, and Luna is listed with the same 1,050,000-token window, so context size does not separate the models; price and the Ultrafast tier do. The changelog dates the Sol release to September 29, 2026, “for complex coding and professional work at a lower cost than GPT-6 Astra”. Terra began rolling out on October 26, 2026 on both v1/responses and v1/chat/completions; the same changelog describes it as “a fast, efficient model for visual reasoning, precise computer use, and clear, natural writing”.

FeatureResponses APIChat Completions API
Default storageStored by default; store: false turns it offStored by default for new accounts; store: false turns it off

Steps 5 and 6: switch the tier on, then time it yourself

Step 5. Add the tier to any Sol request; Astra takes the same parameter.

response = client.responses.create(
    model="gpt-6.1-sol",
    input="Give a one-line status update: deployment succeeded, no errors.",
    service_tier="ultrafast",
)
print(response.output_text)
// stream.mjs
import OpenAI from "openai";

const client = new OpenAI();
const stream = await client.responses.create({
  model: "gpt-6.1-sol",
  input: "Explain how database indexes work, with examples.",
  service_tier: "ultrafast",
  stream: true,
});
for await (const event of stream) {
  if (event.type === "response.output_text.delta") {
    process.stdout.write(event.delta);
  }
}
curl https://api.openai.com/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -d '{"model": "gpt-6.1-sol", "input": "Say hello.", "service_tier": "ultrafast"}'

Step 6. The script below streams the same prompt on each tier in shuffled order, so time of day does not favour one tier. It records time to first token and output tokens per second after the first token, with a client timeout, per-call error handling and a stream closed in finally. Pass the Fast tier’s value from the Fast mode guide through --tiers; standard means no service_tier at all. The script is our code; it reports nothing until you run it. It branches on event.type == "response.output_text.delta", the same event string the Ultrafast guide’s streaming example uses; compare it exactly, because completion, tool-call and error events pass through the same loop and are skipped when the condition does not match them.

import argparse, random, statistics, sys, time
from openai import OpenAI, APIError

client = OpenAI(timeout=60.0, max_retries=0)
MODEL = "gpt-6.1-sol"
PROMPT = "Explain how database indexes work, with examples."

def one_call(tier):
    kwargs = {"model": MODEL, "input": PROMPT, "max_output_tokens": 500, "stream": True}
    if tier != "standard":
        kwargs["service_tier"] = tier
    start = time.perf_counter()
    first, out_tokens = None, None
    stream = client.responses.create(**kwargs)
    try:
        for event in stream:
            if event.type == "response.output_text.delta" and first is None:
                first = time.perf_counter()
            elif event.type == "response.completed":
                out_tokens = event.response.usage.output_tokens
    finally:
        stream.close()
    end = time.perf_counter()
    if first is None or not out_tokens or out_tokens < 2 or end <= first:
        return None
    return first - start, (out_tokens - 1) / (end - first)

def pct(values, p):
    values = sorted(values)
    return values[min(len(values) - 1, int(p * len(values)))]

def main():
    ap = argparse.ArgumentParser()
    ap.add_argument("--tiers", default="standard,ultrafast")
    ap.add_argument("--rounds", type=int, required=True)
    args = ap.parse_args()
    tiers = args.tiers.split(",")
    results = {t: [] for t in tiers}
    for _ in range(args.rounds):
        for tier in random.sample(tiers, len(tiers)):
            try:
                row = one_call(tier)
            except APIError as e:
                print(f"{tier}: {type(e).__name__}", file=sys.stderr)
                continue
            if row:
                results[tier].append(row)
    for tier, rows in results.items():
        if not rows:
            print(tier, "no data")
            continue
        ttft = [r[0] for r in rows]
        tps = [r[1] for r in rows]
        print(f"{tier:10} n={len(rows)} first token median {statistics.median(ttft):.2f}s "
              f"p95 {pct(ttft, 0.95):.2f}s | tokens/s median {statistics.median(tps):.1f} "
              f"slowest-5% {pct(tps, 0.05):.1f}")

if __name__ == "__main__":
    main()

Run it on a prompt from your real route, with --rounds high enough that the p95 is not one or two samples, and again at a different hour. Because OpenAI describes Ultrafast as reducing the time between output tokens, tokens per second is the column to watch; a short reply may show little difference. At six times the Standard price, compare the speed-up you measure with the cost grid below before enabling it. Use Ultrafast where a person waits on a long streamed answer, and leave short replies, background jobs and Batch work off it.

Steps 7 to 9: tools, response state and a stable prompt prefix

Step 7 is tools: Sol supports function calling, web search, file search and computer use. The model returns a function_call item rather than Chat Completions’ tool_calls. Per OpenAI’s guide, for each one you run the named function with the supplied arguments, then “return a function_call_output with the actual result or error and the matching call_id”. Send that in a new responses.create call that references the original response.id, or the model never receives the tool result. File search needs setup first: OpenAI’s file search guide says “Prior to using file search with the Responses API, you need to have set up a knowledge base in a vector store and uploaded files to it”, which makes it a fit for your own documents rather than the open web. Several tools can share one tools array.

import json

tools = [{
    "type": "function",
    "name": "get_order_status",
    "description": "Look up the status of a customer order by ID.",
    "parameters": {"type": "object",
                   "properties": {"order_id": {"type": "string"}},
                   "required": ["order_id"]},
}]

first = client.responses.create(model="gpt-6.1-sol", tools=tools,
                                input="Status of order A-10234?")
outputs = []
for item in first.output:
    if item.type == "function_call":
        args = json.loads(item.arguments)
        result = {"order_id": args["order_id"], "status": "shipped"}  # stand-in result; call your own order lookup here
        outputs.append({"type": "function_call_output",
                        "call_id": item.call_id,
                        "output": json.dumps(result)})

if outputs:
    second = client.responses.create(model="gpt-6.1-sol", tools=tools,
                                     previous_response_id=first.id, input=outputs)
    print(second.output_text)

Step 8 is state: per OpenAI’s migration guide, responses are stored by default, you can turn that off with store: false, and previous_response_id carries a conversation forward. Step 9 is the prefix: put static instructions first and the changing user text last, so the start of the prompt stays the same between calls. The Production guides list a “Keep the prefix unchanged” page under Performance and quality, next to the Ultrafast guide.

SYSTEM_PREFIX = "You are a support assistant. Answer briefly.\n\n"  # stable part first

turn_one = client.responses.create(model="gpt-6.1-sol",
                                   input=SYSTEM_PREFIX + "Status of order A-10234?")
turn_two = client.responses.create(model="gpt-6.1-sol", previous_response_id=turn_one.id,
                                   input=SYSTEM_PREFIX + "Thanks. Anything else I should check?")

The cached rate on the pricing page is 95% below the input rate for Sol ($0.10 against $2) and Terra ($0.05 against $1), and 90% below for Astra ($1 against $10) and Luna ($0.01 against $0.10). Writing to the prompt cache is priced separately. As of November 12, 2026 the prompt caching guide and the pricing page list a 30-minute write at 1.25 times the input price and a 12-hour minimum lifetime at 2.5 times it, the longer option meant for “Stable instructions or reference material reused across longer gaps”, so check which window a price refers to. Ultrafast carries its own row, and every price on it is six times the Standard one.

ModelTierInputOutputCached input30m write12h write
GPT-6 AstraStandard$10.00$50.00$1.00$12.50$25.00
GPT-6 AstraUltrafast$60.00$300.00$6.00$75.00$150.00
GPT-6.1 SolStandard$2.00$10.00$0.10$2.50$5.00
GPT-6.1 SolUltrafast$12.00$60.00$0.60$15.00$30.00
GPT-6.1 TerraStandard$1.00$5.00$0.05$1.25$2.50
GPT-6 LunaStandard$0.10$0.50$0.01$0.125$0.25

Batch halves Sol to $1 input and $5 output per million tokens. Batch suits routes that can wait up to 24 hours; Ultrafast suits routes where a user waits.

What 10,000 requests cost by model and tier

The workload is 2,000 input and 500 output tokens per request, 10,000 requests, so 20 million input and 5 million output tokens. For Sol at Standard that is 20 x $2 + 5 x $10 = $90.00; on Ultrafast it is 20 x $12 + 5 x $60 = $540.00. The cached columns assume 1,500 of the 2,000 input tokens hit the cache, so 15 million cached and 5 million uncached input tokens; for Sol on Standard, 15 x $0.10 + 5 x $2 + 5 x $10 = $61.50, and on Ultrafast, 15 x $0.60 + 5 x $12 + 5 x $60 = $369.00. The grid is our own arithmetic from the pricing-page rates in the Step 4 and Step 9 tables, not a benchmark, and it leaves out cache writes.

ModelStandardBatch (50% off)Standard, 1,500 tokens cachedUltrafastUltrafast, 1,500 tokens cached
GPT-6 Astra$450.00$225.00$315.00$2,700.00$1,890.00
GPT-6.1 Sol$90.00$45.00$61.50$540.00$369.00
GPT-6.1 Terra$45.00$22.50$30.75n/an/a
GPT-6 Luna$4.50$2.25$3.15n/an/a

Because Ultrafast is six times Standard on input, cached input and output alike, a route costs six times its Standard figure: Sol rises from $90.00 to $540.00, an extra $450.00 for the 10,000 requests, or $0.045 per request. That also means Sol on Ultrafast ($540.00) costs more than Sol’s bigger sibling on Standard, Astra at $450.00. Compare Ultrafast with Batch only when a route can wait: Sol on Batch is $45.00 for the same work. Time Fast beside Ultrafast in Step 6 before paying for the six-times tier. Pricing history is in our report on the GPT-6 API price cut.

Steps 10 to 13: a Standard fallback, residency, a CLI and per-tier logs

Step 10. Retry rate limits, timeouts and server errors with backoff and jitter, fail fast on other client errors, and make one last attempt on Standard if Ultrafast keeps failing. The Ultrafast guide states that “Ultrafast has separate rate limits from Standard and Fast modes”, so size and monitor its limits on their own rather than assuming they follow your Standard headroom.

import random, time
from openai import OpenAI, APIConnectionError, APIStatusError, RateLimitError

client = OpenAI(timeout=30.0, max_retries=0)
MAX_ATTEMPTS = 4

def create(prompt, tier):
    kwargs = {"model": "gpt-6.1-sol", "input": prompt}
    if tier != "standard":
        kwargs["service_tier"] = tier
    return client.responses.create(**kwargs)

def call_with_fallback(prompt):
    for attempt in range(MAX_ATTEMPTS):
        try:
            return create(prompt, "ultrafast")
        except (RateLimitError, APIConnectionError):
            pass
        except APIStatusError as e:
            if e.status_code < 500:
                raise
        time.sleep(2 ** attempt + random.random())
    return create(prompt, "standard")

Step 11. Sol’s model page lists US and EU data residency, but Ultrafast is narrower for Astra. As of November 12, 2026, the API changelog gives Ultrafast on Sol global processing with US and EU data residency, while the Astra Ultrafast entry says it is available “with global processing and US data residency. EU and other regional inference residency aren’t supported.” If a project needs EU residency, Sol is the Ultrafast model to test. OpenAI’s data residency help article says “Data residency controls are a project configuration option that allow you to configure the location of infrastructure OpenAI uses to provide services”, so confirm which region a project is pinned to before sending personal data. The pricing page adds that “Regional processing (data residency) endpoints are charged a 10% uplift for models released on or after March 5, 2026”, and the grid above leaves that uplift out, so add it separately when you total a monthly figure. If your compliance rules rule out server-side storage, pass store=False, which the migration guide gives as the way to disable storage.

Step 12. A command-line assistant with web search, streaming, state and a --tier switch that prints elapsed time:

# assistant.py
import argparse, time
from openai import OpenAI

client = OpenAI(timeout=60.0)
ap = argparse.ArgumentParser()
ap.add_argument("--tier", default="standard")
args = ap.parse_args()

last_id = None
while True:
    q = input("You: ").strip()
    if q.lower() in ("exit", "quit"):
        break
    kwargs = {"model": "gpt-6.1-sol", "input": q, "stream": True,
              "tools": [{"type": "web_search"}]}
    if args.tier != "standard":
        kwargs["service_tier"] = args.tier
    if last_id:
        kwargs["previous_response_id"] = last_id
    start = time.perf_counter()
    try:
        stream = client.responses.create(**kwargs)
        for event in stream:
            if event.type == "response.output_text.delta":
                print(event.delta, end="", flush=True)
            elif event.type == "response.completed":
                last_id = event.response.id
        print(f"\n[{time.perf_counter() - start:.1f}s, tier={args.tier}]")
    except Exception as e:
        print(f"\n[error: {type(e).__name__}]")

For multi-step agent loops beyond this script, see our OpenAI Agents API tutorial.

Step 13. Log model, tier and wall-clock latency for every request, then split medians by tier. Roll out in this order: ship on Standard, enable Ultrafast on the one interactive route where users wait on long output, compare its logged medians with your Step 6 results and the cost grid, then widen to further routes, and send anything that can wait to Batch.

Coming from Chat Completions or the Assistants API

OpenAI’s changelog records the March 2025 release of the Responses API as “a new API for creating and using agents and tools”, shipped with built-in web search, file search and computer use tools. OpenAI’s migration page states that “The Assistants API was officially sunset on August 26, 2026, and is no longer available.” and says to use the Responses API for new integrations, so anything still on Assistants must move. For Chat Completions code, the differences to plan for are in Step 7 (the function_call item) and Step 8 (stored responses and previous_response_id). In short: Responses stores server-side by default, while Chat Completions stores by default only for new accounts.

Message arrays need less rework than you might expect. As of November 12, 2026, the migration guide says “If you are not using functions or multimodal inputs, text-only message inputs are compatible from one API to the other”. Function calls and multimodal content are where the two request shapes differ, so test those paths first when you port a route.

Nadia Dubois

Nadia Dubois

AI, software and the business of tech

Nadia Dubois covers AI, software and the business of tech for Tech Insider: AI models and the products built on them, developer and productivity software, pricing, and the company decisions and regulation that shape the industry.

View all articles