cURL
curl --request POST \ --url https://api.openpipe.ai/api/v1/chat/completions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "messages": [ { "role": "system", "content": "", "name": "<string>" } ], "model": "<string>", "audio": { "format": "wav", "voice": "alloy" }, "function_call": "none", "functions": [ { "name": "<string>", "parameters": {}, "description": "<string>", "strict": true } ], "tool_choice": "none", "tools": [ { "function": { "name": "<string>", "parameters": {}, "description": "<string>", "strict": true }, "type": "function" } ], "n": 123, "max_tokens": 123, "max_completion_tokens": 123, "temperature": 123, "top_p": 123, "presence_penalty": 123, "frequency_penalty": 123, "stop": "<string>", "response_format": { "type": "text" }, "logprobs": true, "top_logprobs": 123, "store": true, "metadata": {}, "stream": false } '
{ "id": "<string>", "object": "chat.completion", "created": 123, "model": "<string>", "choices": [ { "finish_reason": "length", "index": 123, "message": { "role": "assistant", "reasoning_content": "<string>", "content": null, "refusal": "<string>", "function_call": { "name": "", "arguments": "" }, "tool_calls": [ { "id": "<string>", "function": { "name": "<string>", "arguments": "<string>" }, "type": "function" } ] }, "logprobs": null, "content_filter_results": {}, "criteria_results": {} } ], "usage": { "prompt_tokens": 123, "completion_tokens": 123, "total_tokens": 123, "prompt_cache_hit_tokens": 123, "prompt_cache_miss_tokens": 123, "completion_tokens_details": { "reasoning_tokens": 123, "audio_tokens": 123, "text_tokens": 123, "accepted_prediction_tokens": 123, "rejected_prediction_tokens": 123 }, "prompt_tokens_details": { "cached_tokens": 123, "audio_tokens": 123 }, "criteria": {} } }
OpenAI-compatible route for generating inference and optionally logging the request.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Show child attributes
none
Successful response
chat.completion