Creates a model response for the given chat conversation
cURL
Chat
curl --request POST \ --url https://api.anyapi.ai/v1/chat/completions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "gpt-5", "messages": [ { "role": "developer", "content": "You are a helpful assistant." }, { "role": "user", "content": "Hello!" } ]}'
{ "id": "<string>", "object": "chat.completion", "created": 123, "model": "<string>", "choices": [ { "index": 123, "message": { "role": "assistant", "content": "<string>", "function_call": { "name": "<string>", "arguments": "<string>" } }, "finish_reason": "stop" } ], "usage": { "completion_tokens": 123, "prompt_tokens": 123, "total_tokens": 123 }, "system_fingerprint": "<string>" }
Bearer token authentication. Get your API key from the dashboard.
Successful response
The response is of type object.
object