Creates a message using Anthropic Messages API format. Supports streaming via SSE.
Async inference: Send x-bf-async: true to submit the request as a background job and receive a job ID immediately. Poll with x-bf-async-id: <job-id> to retrieve the result. When the job is still processing, the response will have an empty content array. When completed, content will contain the full result. See Async Inference for details.
Set to true to submit this request as an async job. Returns immediately with a job ID. Not compatible with streaming.
true Poll for results of a previously submitted async job by providing the job ID returned from the initial async request.
Override the default result TTL in seconds. Results expire after this duration from completion time.
Model identifier (e.g., claude-3-opus-20240229)
"claude-3-opus-20240229"
Maximum tokens to generate
List of messages in the conversation
System prompt
Automatic caching directives for the whole request
Whether to stream the response
0 <= x <= 1MCP servers configuration (requires beta header)
Structured output format (requires beta header)
Successful response