Skip to main content

Execute OpenAI Compatible

POST /api/agents/{id}/openai/chat/completions

Execute a specific chat agent by ID using the OpenAI-compatible API.

Code Examples

See the OpenAI SDK documentation for more info. At the moment, our API only support the temperature and messages (roles system, user and assistant) model parameters. Additionally, the tools parameter is a string enum. To verify the model parameters of an specific agent, see the Get Agent endpoint.

curl --request POST \
--url 'https://tess.pareto.io/api/agents/{id}/openai/chat/completions' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"temperature": "1",
"model": "tess-ai-light",
"messages": [{ "role": "user", "content": "hello there!" }],
"tools": "no-tools",
"stream": true
}'