Skip to content

Chat Completions

POST /v1/chat/completions is the OpenAI Chat Completions API. Use it when your code or SDK already speaks it. It reaches the same models, the same way, at the same prices as Open Responses.

Beta.

curl https://api.openagents.com/v1/chat/completions \
  -H "Authorization: Bearer $OPENAGENTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "openagents/fast",
       "messages": [{"role": "user", "content": "Hi"}]}'

What works the same

Chat CompletionsNotes
system, developer, user, assistant, tool messagesAs in OpenAI's API
Text and image_url parts
tools, tool_choice, parallel_tool_callsFunction tools
response_formatjson_object and json_schema
max_tokens, max_completion_tokensmax_completion_tokens wins when both are set
reasoning_effort
temperature, top_p, stop, seed, userWhere the model supports them; otherwise ignored
stream, stream_options.include_usageUsage arrives in the last chunk before [DONE]
finish_reasonstop, tool_calls, length, content_filter, or error
usagePrompt, completion, cached, and reasoning tokens, plus our openagents cost object
openagentsThe same routing options

What doesn't carry over

FeatureWhat happens
n above 1400; send separate requests
input_audio parts, uploaded file_ids400, naming the part
A message's nameDropped
ReasoningA summary arrives in a reasoning field; hidden reasoning can't be carried to the next turn
Citations and annotationsDropped
Built-in tools such as web searchFunction tools only
Several output items in one turnJoined into one message, in order

When you need reasoning across turns or more than one output item, use Open Responses.