OpenAI Chat
Create a chat completion (OpenAI-compatible)
Chat 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 body
Example request
{
"messages": [
{
"content": "You are a friendly chatbot.",
"role": "system"
},
{
"content": "Hello, world!",
"role": "user"
}
]
}Response
Successful Response
object required