Text request parameters
| Parameter | Required | Purpose |
|---|---|---|
model | yes | the exact ID from /v1/models |
messages | yes | the conversation in the format of the chosen endpoint |
max_tokens | recommended | upper bound on the output |
system | no | the Anthropic Messages system instruction |
temperature | no | answer randomness, if the model supports it |
stream | no | true turns on SSE |
tools | no | descriptions of the available functions |
tool_choice | no | tool selection |
Optional parameters depend on the upstream model. If a request is rejected, strip it down to model, messages and max_tokens first, then add the other fields back one at a time.
The fields image_url, input_image, input_audio, document/image blocks, video fields and non-text modalities are not allowed on the text routes.