Claude 4.8 Opus
Model Overview
API Schema
A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio.
Custom text sequences that will cause the model to stop generating.
If set to True, the model response data will be streamed to the client as it is generated using server-sent events.
falseA system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role.
Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {"type": "function", "function": {"name": "my_function"}} forces the model to call that tool. none is the default when no tools are present. auto is the default if tools are present.
none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools.
Definitions of tools that the model may use. If you include tools in your API request, the model may return tool_use content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using tool_result content blocks. Each tool definition includes: name: Name of the tool. description: Optional, but strongly-recommended description of the tool. input_schema: JSON schema for the tool input shape that the model will produce in tool_use output content blocks.
Configuration for enabling Claude's extended thinking. When enabled, responses include thinking content blocks showing Claude's thinking process before the final answer. Requires a minimum budget of 1,024 tokens and counts towards your max_tokens limit.
The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API.
128000A unique identifier for the chat completion.
chatcmpl-CQ9FPg3osank0dx0k46Z53LTqtXMlThe object type.
chat.completionPossible values: The Unix timestamp (in seconds) of when the chat completion was created.
1762343744The model used for the chat completion.
anthropic/claude-opus-4-8Code Example
Last updated
Was this helpful?