> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sphinx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Use the Sphinx Responses API

> Point your agent's Responses requests at Sphinx to receive context-augmented answers in the Responses format.

The Sphinx Responses API augments your agent's inference requests with learned context. Sphinx can inject context over multiple rounds and returns a response in OpenAI's Responses format.

## Before you start

* Ask Sphinx to enable API access for your organization and confirm the workspace and model configuration for your integration.
* Obtain a Sphinx API key for that setup.
* Use an agent that sends Responses API requests and lets you change the endpoint and authentication.

## Configure your agent

| Setting | Value |
| - | - |
| Full Responses endpoint | `https://api.prod.sphinx.ai/v1/responses` |
| API base URL, if the client appends `/responses` | `https://api.prod.sphinx.ai/v1` |
| Authentication | `Authorization: Bearer YOUR_SPHINX_API_KEY` |
| Model | A supported model ID from the list below |

Replace your agent's inference endpoint and credentials with the Sphinx values.

## Supported OpenAI models

Set the request's `model` field to one of these exact IDs, without an `openai/` prefix:

| Family | Supported model IDs |
| - | - |
| GPT-6.2 | `gpt-6.2-astra`, `gpt-6.2-sol` |
| GPT-6.1 | `gpt-6.1-sol`, `gpt-6.1-terra` |
| GPT-6 | `gpt-6-astra`, `gpt-6-sol`, `gpt-6-luna` |
| GPT-5.6 | `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna` |
| GPT-5.5 | `gpt-5.5` |
| GPT-5.4 | `gpt-5.4`, `gpt-5.4-mini` |
| Codex | `gpt-5.3-codex`, `gpt-5.2-codex` |
| GPT-5.2 | `gpt-5.2` |
| GPT-5 | `gpt-5`, `gpt-5-mini`, `gpt-5-nano` |
| GPT-4.1 | `gpt-4.1`, `gpt-4.1-mini`, `gpt-4.1-nano` |

These are the OpenAI model IDs supported by the Responses API. Availability also depends on your deployment's provider configuration; confirm access with Sphinx. Unlisted model names, including unlisted aliases or dated snapshots, are rejected with `model_not_found`.

> [!NOTE]
>
> Use a Sphinx API key for this endpoint. The MCP endpoint is `https://api.prod.sphinx.ai/mcp` and has a separate client setup flow.

## Send a first request

Set `SPHINX_API_KEY` to your Sphinx key and `SPHINX_MODEL` to the enabled model name in your environment, then send a minimal request:

```bash theme={null}
curl --fail-with-body https://api.prod.sphinx.ai/v1/responses \
  -H "Authorization: Bearer ${SPHINX_API_KEY}" \
  -H "Content-Type: application/json" \
  -d "$(python3 -c 'import json, os; print(json.dumps({"model": os.environ["SPHINX_MODEL"], "input": "Explain our definition of customer lifetime value and distinguish current and historical methodology."}))')"
```

Choose a question covered by your workspace's knowledge. Check that the request succeeds, your agent can read the Responses-format result, and the answer uses the intended business definitions.

> [!WARNING]
>
> Keep the key in your environment or secret store. Do not embed it in source code, publish it in configuration, or include it in screenshots and logs.

## Integrate with an existing agent

Keep your agent's task instructions and source-access tools in place. If it needs local documents, specify their location in its system instructions. If it needs a database, provide the appropriate query tools and access separately.

Test the request options your agent uses, including streaming or tool interactions, before switching a production workflow. Contact Sphinx about any client-specific compatibility requirements.

## Evaluate the integration

Compare the same agent and tasks with and without Sphinx. Hold the model, source access, and success criteria constant, then compare answer quality, cost, and latency. Include new tasks that were not used to develop the learned context.

For incorrect answers, [inspect the relevant knowledge](https://docs.sphinx.ai/concepts/interpretability.md), correct the issue, and rerun your evaluation. Use [Benchmarks (beta)](https://docs.sphinx.ai/benchmarks.md) for recurring checks; contact Sphinx to activate it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.