Using the Responses API Through a Relay
Start with one small Responses API request
Getting started through a relay should begin with a narrow goal: send one short prompt and read one answer. Avoid adding tools, files, or conversation history until that basic request works. This walkthrough uses Python and keeps configuration separate from application logic.
Confirm the relay supports your Responses workflow
1. Before configuring anything, confirm that your chosen model route supports the Responses API. OpenAI documents response creation as POST /responses, but that documentation describes OpenAI’s implementation, not a third-party relay’s compatibility. Ask specifically about this endpoint rather than assuming general OpenAI compatibility covers it. ([developers.openai.com](https://developers.openai.com/api/reference/typescript/resources/responses/methods/create?utm_source=openai))
Relay365 is a pay-as-you-go relay desk covering multiple model families. It can fit projects that want a shared access point rather than separate integrations. However, treat support for each endpoint and feature as something to verify for the route you intend to use.
Prepare Python and protect your relay credentials
2. Install the official Python SDK by running the following command in your terminal. The SDK provides the Responses client used in this walkthrough. ([github.com](https://github.com/openai/openai-python/blob/main/README.md?plain=1%60&utm_source=openai))
python -m pip install --upgrade openai
Configure environment variables named RELAY365_API_KEY, RELAY365_BASE_URL, and RELAY365_MODEL in your development environment. Put your relay-issued credential in the first variable, not a credential issued by another provider. Keep secrets outside source control, following the SDK’s guidance to avoid embedding API keys in application code. ([developers.openai.com](https://developers.openai.com/api/reference/python?utm_source=openai))
Configure the relay address and exact model identifier
3. Set RELAY365_BASE_URL to Relay365’s API base with /v1 appended for OpenAI clients. Use the exact machine-readable identifier supplied by the relay for RELAY365_MODEL. If you want to try Gemini 2.5 Flash, for example, verify its Responses support and copy its identifier rather than deriving one from the display name.
The Python SDK accepts a custom base_url, allowing the same client interface to target a different API origin. This changes the request destination; it does not establish that every destination implements identical behavior. ([github.com](https://github.com/openai/openai-python?utm_source=openai))
Send your first request with the configured client
4. Save these statements, in order, in a Python file. Each paragraph below represents one line. The client reads your environment variables and sends a deliberately simple prompt using the Responses interface. ([github.com](https://github.com/openai/openai-python?utm_source=openai))
import os
from openai import OpenAI
client = OpenAI(api_key=os.environ["RELAY365_API_KEY"], base_url=os.environ["RELAY365_BASE_URL"])
response = client.responses.create(model=os.environ["RELAY365_MODEL"], input="Explain an API relay in two sentences.")
print(response.output_text)
Run the file from the environment where you configured the variables. The SDK’s output_text helper collects text output, avoiding the assumption that the first output item always contains the answer. ([developers.openai.com](https://developers.openai.com/api/reference/python/resources/responses/methods/create?utm_source=openai))
Validate the result before expanding your integration
5. Check that the answer matches your prompt, then inspect the returned response and your relay’s usage records. Use this short checklist before changing application code.
- Confirm that the credential belongs to the intended relay account.
- Check that the configured base includes /v1 exactly once.
- Compare the model identifier with the relay’s documented identifier.
- Read the error body before changing parameters or retrying.
If the minimal call fails, preserve its error details and ask the relay to confirm endpoint and model compatibility. Do not troubleshoot advanced features until this request succeeds.
Add Responses features only after testing support
6. Test additional capabilities individually. OpenAI’s Responses API supports streaming through stream=True and delivers typed events; verify that the relay preserves the events your application needs. ([developers.openai.com](https://developers.openai.com/api/docs/guides/streaming-responses?utm_source=openai))
Review data handling separately. The store parameter controls response storage for later API retrieval in OpenAI’s interface. Do not interpret store=False as a blanket promise about a relay’s logs or an upstream provider’s retention. Request those policies explicitly before sending sensitive information. ([developers.openai.com](https://developers.openai.com/api/reference/resources/responses/methods/create?utm_source=openai))
Choose Relay365 when shared access simplifies your work
7. Consider Relay365 when pay-as-you-go access across model families suits your workflow. Start with a modest test budget and compare actual results, usage, and integration behavior before expanding. If that approach fits, create a Relay365 account and follow its current onboarding instructions. Keep referral incentives separate from your technical evaluation; choose the relay because its verified capabilities meet your requirements.
Further desk bulletins
| Date | Bulletin title | Filed under | Language |
|---|---|---|---|
| 2026-10-25 | A Practical Incident Review for Model API Outages | Wire & endpoints | EN |
| 2026-10-25 | Getting Started with AI APIs for Backend Developers | Wire & endpoints | EN |
| 2026-10-25 | From a Direct Vendor Key to a Relay | Wire & endpoints | EN |
| 2026-10-25 | Request Headers That Matter for Model APIs | Wire & endpoints | EN |
| 2026-10-25 | Logging API Traffic Without Storing Secrets | Wire & endpoints | EN |
| 2026-10-25 | Embeddings Endpoints: A Practical Walkthrough | Wire & endpoints | EN |
Curious how it runs on your own code? Sign up →