Endpoints
Create a chat completion
Send a text conversation. Optional fields and tool support depend on the model.
For the workflow and examples, read the guide.
POST
/v1/chat/completionsAuthorization
bearerAuth AuthorizationBearer <token>
Your Triton AI Developer API key.
In: header
Request Body
application/json
Response Body
application/json
import osfrom openai import OpenAIclient = OpenAI( api_key=os.environ["TRITONAI_API_KEY"], base_url="https://tritonai-api.ucsd.edu/v1",)completion = client.chat.completions.create( model="gpt-5.4", messages=[ { "role": "system", "content": "Answer with short, direct sentences.", }, { "role": "user", "content": "What is a model context window?", }, ],)print(completion.choices[0].message.content)