Skip to content
, ,

OpenAI Background Completion Windows: 2h and 8h Discounts Guide

11–16 minutes
Laughing woman in a pink hijab and denim jacket in a green-lit greenhouse holding a card with the OpenAI logo, hook: 40% off OpenAI 8h window

OpenAI now lets you trade speed for price inside the Responses API. Background mode has two new completion windows, 2 hours and 8 hours, and they cut model token rates by 30% and 40% below Standard.

The same release brought GPT-6.2 Astra and Sol, and a rule that tool calling on them needs the Responses API. This guide covers both changes, with working Python and curl code.

TL;DR

  • New option: background_options.completion_window takes soonest (default), 2h or 8h.
  • Discount: 30% off Standard token rates for 2h, 40% off for 8h. Public beta since 17 November 2026.
  • Models: GPT-6.2 Astra, GPT-6.2 Sol, GPT-6.1 Terra and GPT-6 Luna.
  • Rules: background: true, Standard processing (service_tier: "default"), and no streaming.
  • Batch is still cheaper: 50% off, but only with a 24-hour window and a JSONL upload.
  • Tool calling: GPT-6.2 models support Chat Completions, but tool calls need /v1/responses.

What changed in November 2026

On 17 November 2026, OpenAI’s API changelog listed two linked updates. Both matter if you run agents or long jobs on the newest models.

  • Background completion windows (public beta): background mode in the Responses API can now aim for a 2-hour or 8-hour finish instead of “as soon as possible”. You pay less per token for the wait.
  • GPT-6.2 Astra and GPT-6.2 Sol: Astra targets demanding reasoning and coding. Sol targets everyday coding and agent work.
  • Tool calling needs Responses: both GPT-6.2 models work with Chat Completions, but the changelog says tool calling requires the Responses API.
  • Flex winds down: GPT-6.2 Astra and Sol launch without Flex processing, and OpenAI says it won’t add Flex to future models.

So the discounted windows are the new way to get cheaper, slower processing on the latest models. If you came here from our GPT-6.2 API migration guide, this is the cost side of that story.

Quick answer: add background: true, service_tier: "default" and background_options: {"completion_window": "8h"} to a Responses API call on a supported model. Then poll or use a webhook to fetch the result.

Which window should you pick?

There are three windows. The API targets completion inside the window after it accepts your request. It is a target, not a hard promise.

Window value Best for Token discount Streaming
soonest (default) A user is waiting, but the run is long None Yes
2h Same-day work with a deadline 30% below Standard No
8h Overnight jobs and backlogs 40% below Standard No

Use 2h when

  • Reports due today: a daily summary that must land before an afternoon meeting.
  • Code review queues: pull request reviews that can wait an hour or so.
  • Support triage: tagging tickets where nobody needs the answer in seconds.

Use 8h when

  • Overnight runs: submit at 6 pm, read the results in the morning.
  • Bulk enrichment: summarising docs, writing product copy, or cleaning data.
  • Evals: running test suites against a new prompt version.

Use Batch or soonest instead when

  • Thousands of independent prompts: the Batch API gives 50% off and handles up to 50,000 requests per file.
  • A live user: keep soonest, or skip background mode and call the model normally.
  • Agent loops with tools: background windows fit better than Batch, because each step can depend on the last.

Cost math: Standard vs 2h vs 8h vs Batch

Here are the per-million-token rates from OpenAI’s pricing page for the two GPT-6.2 models. Background rates are the Standard rates with 30% or 40% taken off.

Model and mode Input Cached input Output
GPT-6.2 Astra, Standard $8.00 $0.40 $40.00
GPT-6.2 Astra, background 2h $5.60 $0.28 $28.00
GPT-6.2 Astra, background 8h $4.80 $0.24 $24.00
GPT-6.2 Astra, Batch (24h) $4.00 $0.20 $20.00
GPT-6.2 Sol, Standard $2.00 $0.10 $10.00
GPT-6.2 Sol, background 2h $1.40 $0.07 $7.00
GPT-6.2 Sol, background 8h $1.20 $0.06 $6.00
GPT-6.2 Sol, Batch (24h) $1.00 $0.05 $5.00

A worked example

Say a nightly job uses 10 million input tokens and 2 million output tokens, with no cache hits. This is the bill per run:

Mode GPT-6.2 Astra GPT-6.2 Sol Saving vs Standard
Standard $80 + $80 = $160 $20 + $20 = $40 0%
Background 2h $56 + $56 = $112 $14 + $14 = $28 30%
Background 8h $48 + $48 = $96 $12 + $12 = $24 40%
Batch API $40 + $40 = $80 $10 + $10 = $20 50%

Run that job every night for 30 days on Astra and the 8h window saves $1,920 a month over Standard. Batch saves another $480, but you lose the multi-step agent flow.

Note: GPT-6.1 Terra and GPT-6 Luna also get the 30% and 40% discounts. Work out their rates from the current OpenAI API pricing table, since Standard prices can change.

Step by step: send a 2h or 8h request in Python

You need the official openai Python package and an API key in OPENAI_API_KEY. New to the SDK? Start with our OpenAI API Python tutorial.

  1. Update the SDK. Run pip install -U openai so the client knows the newest fields.
  2. Pick a supported model. Use gpt-6.2-astra, gpt-6.2-sol, gpt-6.1-terra or gpt-6-luna.
  3. Set the three required options. background=True, service_tier="default" and background_options={"completion_window": "8h"}.
  4. Save the response ID. The create call returns at once with a status of queued. Store resp.id in your database.
  5. Poll or wait for a webhook. Retrieve the response by ID until the status leaves queued and in_progress.
  6. Read the output. When the status is completed, use resp.output_text.

Create the request

from openai import OpenAI

client = OpenAI()

resp = client.responses.create(
    model="gpt-6.2-sol",
    input="Summarise these 40 support tickets into 5 themes: ...",
    background=True,
    service_tier="default",
    background_options={"completion_window": "8h"},
)

print(resp.id, resp.status)  # e.g. resp_abc123 queued

Poll until it finishes

import time

def wait_for(response_id, every=30):
    while True:
        r = client.responses.retrieve(response_id)
        if r.status not in ("queued", "in_progress"):
            return r
        time.sleep(every)

final = wait_for(resp.id)
if final.status == "completed":
    print(final.output_text)
else:
    print("Ended with status:", final.status)

OpenAI’s own examples poll every 2 seconds. For an 8-hour window, a 30 to 60 second gap is kinder to your rate limits and your logs.

Tip: for long windows, do not keep a Python process sleeping for hours. Save the ID, end the job, and let a scheduled worker or a webhook pick it up later.

Cancel a request you no longer need

client.responses.cancel(resp.id)

Cancelling is idempotent. Calling it again just returns the final response object.

The same flow with curl

These three calls cover create, check and cancel. Replace the ID with the one you get back.

curl https://api.openai.com/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -d '{
    "model": "gpt-6.2-astra",
    "input": "Write release notes from this changelog: ...",
    "background": true,
    "service_tier": "default",
    "background_options": { "completion_window": "2h" }
  }'
# Check status
curl https://api.openai.com/v1/responses/resp_abc123 \
  -H "Authorization: Bearer $OPENAI_API_KEY"

# Cancel
curl -X POST https://api.openai.com/v1/responses/resp_abc123/cancel \
  -H "Authorization: Bearer $OPENAI_API_KEY"

The status field is what you watch. queued and in_progress mean keep waiting. Anything else, such as completed, failed, incomplete or cancelled, is final.

Get notified with webhooks instead of polling

For 2h and 8h jobs, webhooks are the cleaner choice. OpenAI calls your URL when the response is done, so nothing has to poll.

  1. Create the endpoint. Open platform.openai.com/settings/project/webhooks, click Create, and enter a name and a public HTTPS URL.
  2. Pick events. Subscribe to response.completed, plus the failed, incomplete or cancelled events you want to handle.
  3. Save the signing secret. It is shown once. Put it in OPENAI_WEBHOOK_SECRET.
  4. Verify every call. Pass the raw body and headers to client.webhooks.unwrap() before you parse anything.
  5. Reply fast. Return a 2xx within a few seconds and hand real work to a queue.
  6. Fetch the result. Read the response ID from event.data.id and call responses.retrieve.
from flask import Flask, request
from openai import OpenAI, InvalidWebhookSignatureError

app = Flask(__name__)
client = OpenAI()  # reads OPENAI_WEBHOOK_SECRET from the environment
seen = set()       # use Redis or a DB table in production

@app.post("/openai-webhook")
def hook():
    try:
        event = client.webhooks.unwrap(request.data, request.headers)
    except InvalidWebhookSignatureError:
        return "bad signature", 400

    wid = request.headers.get("webhook-id")
    if wid in seen:
        return "", 200
    seen.add(wid)

    if event.type == "response.completed":
        enqueue_fetch(event.data.id)  # your worker calls responses.retrieve
    return "", 200

OpenAI retries a failed delivery with backoff for up to 72 hours. Duplicates can happen, which is why the code checks the webhook-id header.

Warning: redirects are not followed and count as failures. Register the final URL, not one that 301s to another path.

Multi-step agent runs with continuation_id

This is where background windows beat Batch. An agent can call a tool, wait for your result, and continue, all at the discounted rate.

  1. Start the run. Send the first request with background: true, your window, a function tool, and a continuation_id you choose.
  2. Handle the tool call. When the response completes, find the function_call item, run your function and keep the output.
  3. Send the follow-up. Use the same model, service tier, background setting, window and continuation_id. Add previous_response_id and a function_call_output item with the original call_id.
  4. If the old response expired. Drop previous_response_id. Replay the original input and every saved output item in order, then add the new function output.
follow = client.responses.create(
    model="gpt-6.2-sol",
    background=True,
    service_tier="default",
    background_options={
        "completion_window": "2h",
        "continuation_id": "nightly-audit-2026-11-23",
    },
    previous_response_id=first.id,
    input=[{
        "type": "function_call_output",
        "call_id": call.call_id,
        "output": '{"rows": 1284}',
    }],
    tools=tools,
)

Reusing the same continuation_id makes follow-ups eligible for higher queue priority. The discount applies to every eligible request in the run, not just the first.

Migrate tool calls from Chat Completions to Responses

GPT-6.2 Astra and Sol still answer plain Chat Completions requests. But OpenAI’s changelog and migration guide both say tool calling requires the Responses API. The function calling guide says the same about GPT-6 Astra and GPT-6.1 Sol.

What changes, field by field

Piece Chat Completions Responses
Endpoint /v1/chat/completions /v1/responses
History messages input (string or list of items)
Tool definition {"type": "function", "function": {name, parameters}} {"type": "function", "name", "parameters"} (flat)
Model’s tool call message.tool_calls[] function_call item in response.output
Your result A tool role message A function_call_output item with call_id
Final text choices[0].message.content response.output_text
Reasoning effort reasoning_effort reasoning.effort

A full tool loop in Responses

import json
from openai import OpenAI

client = OpenAI()

tools = [{
    "type": "function",
    "name": "get_order_status",
    "description": "Look up an order by ID",
    "parameters": {
        "type": "object",
        "properties": {"order_id": {"type": "string"}},
        "required": ["order_id"],
        "additionalProperties": False,
    },
    "strict": True,
}]

history = [{"role": "user", "content": "Where is order A-1042?"}]
resp = client.responses.create(model="gpt-6.2-sol", input=history, tools=tools)

for item in resp.output:
    if item.type == "function_call":
        args = json.loads(item.arguments)
        result = {"order_id": args["order_id"], "status": "shipped"}
        history += resp.output  # keep the model's items, in order
        history.append({
            "type": "function_call_output",
            "call_id": item.call_id,
            "output": json.dumps(result),
        })

final = client.responses.create(model="gpt-6.2-sol", input=history, tools=tools)
print(final.output_text)

Other GPT-6.2 gotchas while you migrate

  • Instructions move: GPT-6.2 appends top-level instructions after input. Put reusable, cacheable guidance in a developer message as the first input item.
  • Keep the prefix stable: editing earlier history can make the API drop reasoning items. Change settings without rewriting old turns.
  • Removed sampling knobs: leave out temperature, top_p and top_logprobs on Responses requests.
  • Caching option renamed: coming from GPT-5.5 or older, swap prompt_cache_retention for prompt_cache_options.ttl.

Limits, caching and data retention

A few rules are easy to miss in the docs. They affect both cost and design.

  • Rate limits: 2h and 8h requests share the Batch/Background queued-token limit with Batch API jobs. Input tokens count when you submit. soonest uses normal limits.
  • Prompt cache: Standard requests outside the discounted windows can’t reuse cache entries made by 2h or 8h requests, even with identical prompts.
  • Data storage: background mode stores response data for a while even with store: false or Zero Data Retention. It is encrypted at rest.
  • Retries: the API retries eligible capacity errors for 2h and 8h requests on its own.
  • Streaming: only the soonest window can stream. A dropped stream can resume with starting_after and the last sequence_number.

How it compares with Batch and Flex

Feature Background 2h / 8h Batch API Flex
Discount 30% / 40% 50% Batch rates
Window 2 or 8 hours (target) 24 hours Synchronous, slower
How you submit Normal Responses call JSONL file upload service_tier: "flex"
Multi-step agents Yes, with continuation_id No, independent requests Yes
GPT-6.2 Astra / Sol Yes Yes No
Status Public beta Generally available Winding down

If you also use Anthropic, the idea is close to our Claude Message Batches API tutorial. The big difference is that OpenAI’s windows work per request, not per file.

My Take

For most teams, the 8h window is the easy win. If a job already runs overnight, adding three fields cuts the token bill by 40% with almost no code change.

Batch still wins on raw price for big piles of independent prompts. But Batch never fit agent loops well, and the new windows fill that gap neatly.

The tool calling rule is the bigger chore. If your code still sends tools to Chat Completions, plan the move to Responses now, before you switch to GPT-6.2.

Troubleshooting: Common Problems and Fixes

The discount does not show on my bill

Check that service_tier is "default". With auto, a request only qualifies if the API picks Standard. Also confirm background is true and the model is on the supported list.

Error when I set stream to true

Streaming only works with the soonest window. Remove stream or set it to false for 2h and 8h, then poll or use a webhook.

Tool calls fail on GPT-6.2 through Chat Completions

This is expected. Move the request to /v1/responses, flatten your tool definitions, and return results as function_call_output items. Our OpenAI API errors guide covers the common 400 messages.

429 errors on background jobs

Your 2h and 8h requests share the queued-token limit with Batch jobs. Spread submissions out, or pause big Batch uploads while background runs are queued.

Flex stopped working after I switched models

GPT-6.2 Astra and Sol do not support Flex. Use the 8h background window instead for a similar slow-but-cheap trade.

Webhook never arrives

  • Check the URL: it must be public HTTPS and must not redirect.
  • Check the events: make sure response.completed is ticked for that project.
  • Check the signature: verify the raw bytes, not parsed JSON, or unwrap() will reject it.

Follow-up says the previous response is missing

The stored response may have expired. Drop previous_response_id and replay the original input plus every saved output item in order.

Frequently Asked Questions

What are OpenAI background completion windows?

They are options in Responses API background mode that let you choose a 2-hour or 8-hour target finish time. In return, token rates drop 30% or 40% below Standard.

Which models support the 2h and 8h windows?

At launch the public beta covers GPT-6.2 Astra, GPT-6.2 Sol, GPT-6.1 Terra and GPT-6 Luna. Check OpenAI’s background mode guide for any additions.

What is the exact parameter name?

Use background_options.completion_window with the value "2h" or "8h", together with background: true and service_tier: "default".

Is it cheaper than the Batch API?

No. Batch is 50% off Standard, while the windows give 30% and 40%. The windows are better for agent loops and single requests that don’t fit a JSONL batch.

Does OpenAI guarantee the result within 2 or 8 hours?

The docs say the API targets completion within the window after it accepts the request. Build your app to handle a late, failed or incomplete response anyway.

Can I still use Chat Completions with GPT-6.2?

Yes, for plain text requests. Tool calling on GPT-6.2 Astra and Sol requires the Responses API, and background mode is a Responses feature too.

Do cached tokens get the discount too?

Yes. OpenAI’s pricing shows cached input for GPT-6.2 Astra at $0.28 for 2h and $0.24 for 8h, versus $0.40 on Standard.

Sources

Free weekly email

Get new AI guides every week

One short weekly email with our newest local AI, ComfyUI and AI tool guides. No spam, no pop-ups, just the good stuff.

Free. Unsubscribe anytime in one click. We only use your email to send this newsletter. See our privacy policy.

Laughing woman in a pink hijab and denim jacket in a green-lit greenhouse holding a card with the OpenAI logo, hook: 40% off OpenAI 8h window