Create an OpenAI-compatible response
Create a response using Telnyx's OpenAI-compatible Responses API. This endpoint is compatible with the OpenAI Responses API and may be used with the OpenAI JS or Python SDK by setting the base URL to https://api.telnyx.com/v2/ai/openai.
The conversation parameter refers to a Telnyx Conversation rather than an OpenAI-hosted conversation object. To persist a thread across turns, first create a conversation with POST /ai/conversations, then pass that conversation's id in the Responses request as conversation. The endpoint appends the new input, assistant output, reasoning, and tool-call messages to that conversation. Reuse the same conversation id on subsequent Responses requests, including tool-result followups, so the model receives the prior context.
If conversation is omitted, the request is processed without persisting messages to a Telnyx conversation. Use the Conversations API to manage history: list conversations (optionally filtered by metadata), fetch messages for a conversation, and optionally add messages outside the Responses flow.
You can attach arbitrary metadata when creating a conversation (for example to tag the conversation's source, channel, or user) and later filter by it when listing conversations.
Request body
Response
Successful Response
Changes
Changed in 2 of the 99 revisions of this API.4
- ○
added the new optional request property
new-optional-request-property
- ○
added the new optional request property
new-optional-request-property
- ○
added the new optional request property
new-optional-request-property
This revision also has 34 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ○
added the new optional request property
new-optional-request-property
- ○
Of the 99 revisions, 1 has no diff computed.