Responses API
Use the OpenAI Responses API with the Ertas AI Gateway for stateless API calls, with streaming and structured output. Stored responses are coming soon.
On this page
The gateway also accepts the OpenAI Responses format at POST /v1/responses, so clients and agents built on it can call Ertas models.
resp = client.responses.create(
model="ertas-ai/medertas-27b",
input="List three red-flag symptoms of a headache.",
)
print(resp.output_text)
print(resp.usage)What works today
- Basic API calls with
inputandinstructions, with usage reported in the Responses format. - Streaming with
stream: true. The standard events arrive, ending withresponse.completed. - Structured output with
text.formatand a JSON Schema.
Stateless calls only, for now
The gateway doesn't store responses yet, so each API call stands on its own. Stored responses are under development and coming soon. Until then:
previous_response_idisn't supported. Send the earlier turns yourself ininput, as you would with Chat Completions.- Retrieving a response by ID (
GET /v1/responses/{id}) isn't available.
history = [{"role": "user", "content": "A patient's BP is 156/94. Is that hypertension?"}]
first = client.responses.create(model="ertas-ai/medertas-27b", input=history)
history += [
{"role": "assistant", "content": first.output_text},
{"role": "user", "content": "What stage?"},
]
second = client.responses.create(model="ertas-ai/medertas-27b", input=history)If an agent or framework relies on stored responses, use its Chat Completions mode instead, or turn off response storage in its settings.
For tool calls, use Chat Completions.