C.W.K.
Stream
Lesson 07 of 07 · published

Background Mode & Reasoning

~22 min · background, reasoning, o-series

Level 0Tokenizer
0 XP0/54 lessons0/10 achievements
0/120 XP to next level120 XP to go0% complete

Background mode lets you submit long-running tasks and retrieve results later. Combined with the reasoning parameter, you can control how deeply the model thinks.

Reasoning Parameter

For stateless workflows (zero data retention), use encrypted reasoning: include ["reasoning.encrypted_content"] in the include parameter and pass the encrypted reasoning back in subsequent turns.

Two orthogonal knobs

Background mode is about delivery: submit, poll, retrieve. The work runs server-side without you holding an HTTP connection for two minutes. Reasoning effort is about depth: how many hidden chain-of-thought tokens the model is allowed to use before producing visible output.

You can combine them — background=True + reasoning_effort='high' for a long deep-research call that takes 2-5 minutes. Or use them separately. Always log usage.reasoning_tokens on o-series; it's the cost line that surprises teams new to reasoning models.

Code

background=True submit + poll·python
import time

# Submit async job
response = client.responses.create(
    model="o3",
    input="Solve this complex math problem...",
    background=True,
)
job_id = response.id

# Poll for completion
while True:
    result = client.responses.retrieve(job_id)
    if result.status == "completed":
        print(result.output_text)
        break
    time.sleep(5)
reasoning_effort='high' on o3·python
response = client.responses.create(
    model="gpt-5.4",
    input="Design an efficient sorting algorithm for a trillion integers.",
    reasoning={
        "effort": "high",          # "low", "medium", "high"
        "generate_summary": True,
        "summary": "concise",      # "concise", "detailed", "auto"
    },
)

# Access reasoning summary
for item in response.output:
    if item.type == "reasoning":
        print("Reasoning:", item.summary_text)

External links

Exercise

Submit the same hard reasoning task to o3 with reasoning_effort 'low', 'medium', 'high'. Log accuracy (manually graded) and reasoning_tokens for each. Decide where the cost/quality knee is for your task.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.