MindRouter now speaks OpenAI's two newest APIs: Responses (/v1/responses) and Conversations (/v1/conversations). Together they give your programs something the classic endpoints never had: a memory. They also bring live web search, automatic context management, and compatibility with modern AI agents like OpenAI's Codex.
This post explains why these endpoints exist, what they do, and how to use them, with copy-paste Python examples throughout. No deep technical background needed. If you can run a Python script, you can use everything here.
[TOC]
Why: the goldfish problem
The endpoints most people use today, /v1/chat/completions and its older sibling /v1/completions, are stateless. Every request stands completely alone. The model has no idea you ever talked to it before.
That means if you're building anything conversational (a study helper, a research assistant, a data-analysis script that asks follow-up questions), your code has to keep the entire conversation history and resend all of it with every single message. Ask question #20 and you're re-uploading questions #1 through #19 along with it. It works, but it makes your code more complicated, your requests bigger and bigger, and your bugs harder to find. Forget one message during resending and the model quietly loses its memory mid-conversation, like a goldfish.
OpenAI's answer is the Responses API, and the industry is moving to it quickly: it's what the newest SDKs teach first, and what agentic tools like the Codex coding assistant require. MindRouter now implements it natively, so the same code that works against OpenAI works against our on-campus cluster, with your data staying on campus.
What: two endpoints that work as a team
/v1/responses is the modern way to ask a model for work. You send it input, it returns a structured "response object." Compared to chat completions, it understands richer inputs (text, images, tool results), returns richer outputs (the model's answer, its reasoning, and any tool calls are separate, clearly-labeled items), and, most importantly, it can remember previous responses so you don't have to resend anything.
/v1/conversations is the memory itself. A conversation is a durable object that lives on the MindRouter server. Every time a response runs "inside" a conversation, what you asked and what the model answered are appended automatically. Your next request just says which conversation it belongs to, and the model sees the whole history.
The division of labor is simple:
/v1/conversationsstores the dialogue./v1/responsesdoes the thinking, reading and writing the conversation for you.
How: five small examples
You'll need an API key from your MindRouter dashboard and a recent OpenAI Python library (pip install --upgrade openai). Every example uses the same two-line setup:
from openai import OpenAI
client = OpenAI(
base_url="https://mindrouter.example.com/v1",
api_key="mr2_your-api-key-here",
)
1. Your first response
response = client.responses.create(
model="qwen/qwen3.5-122b", # any model from /v1/models works
input="Explain photosynthesis in two sentences.",
)
print(response.output_text)
That's the whole thing. input can be a plain string: no message arrays, no roles to remember.
2. A conversation that remembers
# Create the memory once
conv = client.conversations.create(metadata={"project": "bio-101-study"})
# Talk inside it. Notice we never resend history
client.responses.create(
model="qwen/qwen3.5-122b",
conversation=conv.id,
input="My exam is on cell respiration. Quiz me with one question.",
)
followup = client.responses.create(
model="qwen/qwen3.5-122b",
conversation=conv.id,
input="Give me a hint.", # the model knows which question it asked!
)
print(followup.output_text)
The conversation persists on the server. Close your laptop, come back tomorrow, pass the same conv.id, and the model picks up right where you left off. You can list what's stored (client.conversations.items.list(conv.id)) and delete the whole thing whenever you want (client.conversations.delete(conv.id)).
For quick two-step follow-ups without creating a conversation object, there's also a lighter mechanism: pass previous_response_id=<the last response's id> and MindRouter reconstructs the context from its stored responses.
3. Live web search: the model looks things up for itself
Models only know what they were trained on. Hand yours a search engine:
response = client.responses.create(
model="qwen/qwen3.5-122b",
input="What's the weather forecast for Moscow, Idaho this week?",
tools=[{"type": "web_search"}],
)
print(response.output_text)
When the model decides it needs current information, MindRouter runs the search for it (using the same campus search service behind our /v1/search endpoint), feeds the results back, and the model answers with today's facts. Each search shows up in the response as a labeled web_search_call item, so you can always see what was looked up.
4. Never blow the context window again
Long conversations eventually exceed what a model can read at once. Classic endpoints just fail with an error. Responses can handle it for you:
response = client.responses.create(
model="qwen/qwen3.5-122b",
conversation=conv.id,
input="Summarize everything we've covered so far.",
truncation="auto", # drop the oldest turns instead of erroring
)
With truncation="auto", MindRouter trims the oldest turns (never your newest message or the system instructions) so the request always fits.
5. Check the cost before you send
count = client.responses.input_tokens.count(
model="qwen/qwen3.5-122b",
input="How many tokens is this question?",
)
print(count.input_tokens) # exact count, no generation, no quota spent on output
Bonus: plug in a coding agent
Because MindRouter speaks the Responses protocol natively, agent tools built on it just work. If you use OpenAI's Codex (the ChatGPT desktop app's coding agent or the codex CLI), point it at campus hardware by adding this to ~/.codex/config.toml:
# These two lines must be at the TOP of the file, before any [section]
model_provider = "mindrouter"
model = "qwen/qwen3.6-25b"
[model_providers.mindrouter]
name = "MindRouter"
base_url = "https://mindrouter.example.com/v1"
env_key = "MINDROUTER_API_KEY"
wire_api = "responses"
requires_openai_auth = false
Your agent sessions then run entirely on university GPUs, including its web searches.
What's beyond chat completions, exactly?
| Capability | /v1/chat/completions |
/v1/responses + /v1/conversations |
|---|---|---|
| Server-side memory | ✗ resend everything, every time | ✓ conversations & previous_response_id |
| Live web search, run by the server | ✗ | ✓ {"type": "web_search"} |
| Automatic context trimming | ✗ errors when too long | ✓ truncation="auto" |
| Reasoning shown separately from the answer | mixed into one message | ✓ separate, labeled output items |
| Token counting endpoint | ✗ | ✓ /v1/responses/input_tokens |
| Works with Codex & modern agent tools | ✗ (they require Responses) | ✓ |
| Retrieve / delete past responses by id | ✗ | ✓ (store=true, on by default) |
The old endpoints aren't going anywhere; existing scripts keep working untouched. But new projects should start here.
What's implemented, and what isn't (yet)
We validated all of this against the official OpenAI Python SDK and real Codex agent sessions, so we can be precise.
Implemented: text, image, and multi-item inputs; streaming and non-streaming; function/tool calling; separated reasoning output from thinking models; structured JSON output; stored responses (retrieve, delete, list input items); the full Conversations API (create, seed, update, delete, item management); hosted web search; truncation="auto"; token counting; previous_response_id chaining.
Not implemented: background mode (fire-and-forget responses you poll later), file inputs (input_file / file_id, attaching PDFs directly), OpenAI's other hosted tools (file_search, code_interpreter), clickable citation annotations on web-search answers (sources appear in the answer text instead), and replaying a stored response as a live stream. If one of these would unblock a project of yours, let us know; several are on our roadmap.
Also worth knowing: stored responses are kept for 30 days; conversations are kept until you delete them. Both have sensible per-user limits, and everything is covered by the same quotas and audit logging as the rest of MindRouter.
Get started
- Full technical reference with every parameter: Responses API Documentation
- OpenAI Responses API Documentation: OpenAI Responses API
- Create an API key: MindRouter Dashboard
- See available models:
GET /v1/models(or the models page)
Happy building, and enjoy talking to models that finally remember what you said. Unlike a goldfish.
-- MindRouter Team
Email Us