Triton AI Docs
Developer API

Responses

Create and stream responses with Python or cURL.

Use the Responses API with compatible OpenAI-family models and coding clients. The Developer API exposes this route at /v1/responses.

Model support varies

The public catalog does not publish a Responses capability flag. Test the selected model before you depend on this route.

Create a response

response.py
import os

from openai import OpenAI

client = OpenAI(
    api_key=os.environ["TRITONAI_API_KEY"],
    base_url="https://tritonai-api.ucsd.edu/v1",
)

response = client.responses.create(
    model="gpt-5.6-luna",
    input="Explain cosine similarity in two sentences.",
    store=False,
)

print(response.output_text)

The response has an output array. Text is usually in an output_text content item inside a message.

Stream text

stream_response.py
stream = client.responses.create(
    model="gpt-5.6-luna",
    input="List three checks for an API integration.",
    stream=True,
    store=False,
)

for event in stream:
    if event.type == "response.output_text.delta":
        print(event.delta, end="", flush=True)

The streaming route sends server-sent events. Read response.output_text.delta events until the stream sends a completion or error event.

Main request fields

Prop

Type

Tools and state

The production route returns function_call output items for compatible models. Each item contains a function name, arguments, and call_id.

Read Tool calling before your application executes a requested function.

Do not assume built-in tool support

Custom functions use your application code. OpenAI built-in tools can require upstream services that a Triton AI route does not expose.

OpenAI documents the upstream Responses API and streaming events. Triton AI support depends on the selected route.

On this page