# How do you build with GPT-6.1 Sol in the API?

Date: 2026-10-08 · Author: Robert Scales · https://guidetoartificialintelligence.com/en/learn/build-gpt-6-1-sol-api/

**Answer:** You call GPT-6.1 Sol through OpenAI's Responses API by setting the model to gpt-6.1-sol, choosing a reasoning effort, and putting the instructions you reuse at the start of every request so they can be served from the cache. The request looks the same as for earlier models; what changes is the price, the effort you need, and the results you should re-check.

GPT-6.1 Sol is the mid-priced model OpenAI introduced at DevDay on September 29. For developers, it is reachable through the API under the name `gpt-6.1-sol`, at $2 per million input tokens, $10 per million output tokens and $0.10 per million cached input tokens. A **token** is a small piece of text, often part of a word, and it is the unit you pay for.

Building with it takes three decisions: which API to call, how hard the model should think, and how to arrange your prompt so repeated parts cost less. This guide walks through each one with a small working program you can adapt.

## Step 1: make a first call

OpenAI's official Python library, installed with `pip install openai`, treats the **Responses API** as its main way to talk to models. You send instructions and input, and read the reply from a single field. The library looks for your key in the `OPENAI_API_KEY` environment variable, so the key never needs to appear in your code.

```python
from openai import OpenAI

client = OpenAI()  # uses the OPENAI_API_KEY environment variable

response = client.responses.create(
    model="gpt-6.1-sol",
    reasoning={"effort": "medium"},
    instructions="You are a careful editor. Answer in plain English.",
    input="Rewrite this sentence for a beginner: 'Latency is bounded by I/O.'",
)

print(response.output_text)
```

Three parts matter here. `model` picks GPT-6.1 Sol. `instructions` hold the standing rules, the part that stays the same between requests. `input` holds what changes each time. The `reasoning` setting is covered next.

## Step 2: choose a reasoning effort

GPT-6.1 Sol is a **reasoning model**: before it answers, it works through the problem in hidden steps that you also pay for as output tokens. The **reasoning effort** setting controls how much of that thinking it does. The Python library lists the values the API accepts in general: `none`, `minimal`, `low`, `medium`, `high`, `xhigh` and `max`. Not every model takes every value, so test the one you plan to use.

OpenAI's launch figures suggest you may not need high settings for everyday work. It reports that on DeepSWE v1.1, a test of long coding tasks, GPT-6.1 Sol beat GPT-6 Sol's best score while using a lower effort. It also says the biggest drop in factual errors came at low effort, where the share of answers with an error fell from 11.4% to 7.7% on deliberately difficult prompts.

A sensible routine: start at `medium`, try `low` on the same test cases, and only move up to `high` or beyond for tasks where the lower settings visibly fail.

## Step 3: put the fixed part first so it can be cached

**Prompt caching** means the API remembers the beginning of a prompt it has recently seen. When a new request starts with the same text, those tokens are billed at the cached rate. For GPT-6.1 Sol that rate is $0.10 per million tokens instead of $2, a 95% discount.

The rule is simple: everything that never changes goes first, and everything that changes goes last. Here is a support-reply drafter built that way.

```python
from openai import OpenAI

client = OpenAI()

with open("support_policy.md") as f:   # long, unchanging rules and examples
    POLICY = f.read()

def draft_reply(customer_message, effort="low"):
    response = client.responses.create(
        model="gpt-6.1-sol",
        reasoning={"effort": effort},
        instructions=POLICY,        # same text every time: cache-friendly
        input=customer_message,     # changes every time: goes last
    )
    cached = response.usage.input_tokens_details.cached_tokens
    print(f"input {response.usage.input_tokens}, cached {cached}, "
          f"output {response.usage.output_tokens}")
    return response.output_text

print(draft_reply("My invoice shows two charges for October."))
```

The printed line lets you confirm caching is working: after the first request, the cached count should be close to the length of your policy text.

What does that save? Suppose the policy is 4,000 tokens, each customer message 500, each reply 400, and you send 1,000 requests a day. The figures below are illustrative, using list prices.

| Per day | Without caching | With the policy cached |
|---|---|---|
| Policy tokens (4 million) | $8.00 | $0.40 |
| Customer messages (0.5 million) | $1.00 | $1.00 |
| Replies (0.4 million output) | $4.00 | $4.00 |
| **Total** | **$13.00** | **$5.40** |

Reasoning tokens count as output, so a higher effort raises the last row. That is one more reason to test lower settings first.

> **Try it:** Run `draft_reply` on five real messages at `low`, then again at `medium`. Read the ten answers side by side, note which ones you would send without edits, and compare the token counts printed for each run.

## Step 4: check the results before switching everything

Benchmarks from a model's maker describe the maker's tasks, not yours. Keep a small set of 20 to 50 real inputs with answers you trust, run them through your current model and through GPT-6.1 Sol, and compare quality, speed and cost. Switch a feature only when the new model holds up on that set.

## What changed for developers?

The code barely changes. If your app already uses the Responses API, moving to GPT-6.1 Sol can be a one-line edit to the `model` value. The real changes are in price, effort and behavior.

On price, cached input is now $0.10 per million tokens, which OpenAI says is half of GPT-6 Sol's cached rate. Apps that resend long instructions, documents or tool definitions benefit most, so it is worth checking that your prompts put those parts first. Against GPT-6 Astra, OpenAI prices GPT-6.1 Sol at one-fifth of the standard input and output rates.

On effort, the launch results point toward lower settings doing more than before. Re-tune rather than copying your old setting: run your test set at the effort you use today and at one step lower, and keep the cheaper one if the answers hold.

On behavior, OpenAI reports that GPT-6.1 Sol is more open about its limits than GPT-6 Sol, more reliable at respecting explicit restrictions, and better at telling users when a tool such as search is broken. If your app relies on the model following "never do X" rules, rerun those tests too. Better behavior on OpenAI's evaluations is a good sign, but your own guardrails deserve their own check.

## Sources

- Introducing GPT-6.1 Sol: https://openai.com/index/introducing-gpt-6-1-sol/
- openai-python: README, reasoning_effort.py and chat_model.py: https://github.com/openai/openai-python/blob/e5de2e5656fb3d4fa70f050195382e6a4d59f806/README.md
