Skip to main content
POST
Claude chat

Autorisations

Authorization
string
header
requis

Authenticate with a Bearer Token. Format: Authorization: Bearer sk-xxxxxx

En-têtes

anthropic-version
string
requis

Anthropic API version

Exemple:

"2023-06-01"

x-api-key
string

Anthropic API key (optional, Bearer Token is also supported)

Corps

application/json
model
string
requis
Exemple:

"claude-3-opus-20240229"

messages
object[]
requis
max_tokens
integer
requis
Plage requise: x >= 1
system
cache_control
object
inference_geo
string
temperature
number
Plage requise: 0 <= x <= 1
top_p
number
top_k
integer
stream
boolean
stop_sequences
string[]
tools
object[]
tool_choice
object
thinking
object
context_management
object
output_config
object
output_format
object
container
mcp_servers
object[]
metadata
object
speed
enum<string>
Options disponibles:
standard,
fast
service_tier
enum<string>
Options disponibles:
auto,
standard_only

Réponse

200 - application/json

Response created successfully

id
string
type
string
Exemple:

"message"

role
string
Exemple:

"assistant"

content
object[]
model
string
stop_reason
enum<string>
Options disponibles:
end_turn,
max_tokens,
stop_sequence,
tool_use
usage
object