Send a JSON request to POST /v1/chat/completions with Authorization: Bearer YOUR_API_KEY.

Parameters

ParameterRequiredMeaning
modelYesExact model ID from the current model list.
messagesYesConversation history and current input, with role and content for each message. Common roles are system, user, and assistant.
temperatureNoSampling temperature; range and default depend on the selected model.
streamNoSet to true to receive incremental output where supported.
max_tokensNoMaximum output token count.
toolsNoTool or function definitions, where supported.
reasoning_effortNoModel-specific reasoning level, commonly low, medium, or high where supported.
Select the model through Models API. Do not assume all models accept the same optional parameters. See Usage and costs for how conversation history affects input consumption.

Newer Claude models ignore sampling parameters

When you call the Claude Sonnet 5 family, Claude Opus 5 family, Claude Opus 4.7, Claude Opus 4.8, Claude Haiku 5.5 and Claude Fable 5 family through this endpoint, temperature, top_p and top_k have no effect: Infistar removes them before forwarding the request, and the request succeeds without an error. These models do not support custom sampling parameters; describe the style you want in the prompt instead. Through Claude Messages (POST /v1/messages), Infistar forwards these parameters unchanged; they are still not guaranteed to take effect, and some lines reject the request, so leave them out.