/v1/messageshttps://api.linkinfra.aiAuthorization
Bearer TokenAuthorizationBearer <token>Authenticate requests with your API key in the request header:
Authorization: Bearer sk-your-api-keyNeed a key? Create one in the console
anthropic-version2023-06-01This endpoint accepts Authorization: Bearer and x-api-key. When using the Anthropic SDK, set base_url to the API root without /v1.
Request body
application/jsonmodelstringrequiredModel ID from the model catalog. Availability depends on your account group and configured channels.
messagesarray<object>requiredA list of user and assistant messages. Put the system prompt in system.
max_tokensintegerrequiredMaximum number of generated tokens.
systemstring | arraySystem prompt text or content blocks.
streambooleanSet to true to receive incremental Server-Sent Events. Defaults to false.
Streaming follows Anthropic SSE events, including message_start, content_block_delta, and message_stop.
Response
application/json200Successful responsecontentarray<object>Generated content blocks. Text blocks have type text.
stop_reasonstringStop reason, such as end_turn, max_tokens, or tool_use.
usageobjectToken usage for this request. Check usage logs in the console for actual charges.