{
"model": "claude-sonnet-4-20250514",
"max_tokens": 512,
"messages": [
{
"role": "user",
"content": "请用三句话介绍王维。"
}
]
}curl --location 'https://api.onelinkai.cloud/v1/messages' \
--header 'Authorization: Bearer <ApiKey>' \
--header 'Content-Type: application/json' \
--data '{
"model": "claude-sonnet-4-20250514",
"max_tokens": 512,
"messages": [
{
"role": "user",
"content": "请用三句话介绍王维。"
}
]
}'{
"id": "string",
"type": "string",
"role": "string",
"content": [
{
"type": "string",
"text": "string",
"id": "string",
"name": "string",
"input": {}
}
],
"model": "string",
"stop_reason": "string",
"stop_sequence": "string",
"usage": {
"input_tokens": 0,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"output_tokens": 0
}
}