OpenAI Chat
Create a chat completion (OpenAI-compatible)
Changed onChat with a language model. This endpoint is consistent with the OpenAI Chat Completions 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.
post/ai/openai/chat/completions
Request
- Base URL: https://api.telnyx.com/v2
- URL: https://api.telnyx.com/v2/ai/openai/chat/completions
- Auth: HTTP bearer
Request body
Example request
{
"messages": [
{
"role": "system",
"content": "You are a friendly chatbot."
},
{
"role": "user",
"content": "Hello, world!"
}
]
}Response
Successful Response
object required
Changes
- info
the
request property default value8192was removed
- info
- info
the request property
became nullable - info
the
request property default value8192was added
- info