Endpoint
Authentication and API version
2023-06-01 Messages format. Change the version if your model or channel requires it; a new upstream version does not automatically mean the gateway supports it.
Replace
YOUR_ANTHROPIC_MODEL with an available model ID that supports Anthropic Messages.Request parameters
Put instructions in the top-level
system field, not in a message with role: "system". Tools, thinking, and multimodal features require model and channel support.
Request examples
SetVIVI_API_KEY to your ViVi-API key in your shell environment. See Quickstart to create a key. Install requests with python -m pip install requests. cURL uses Bash syntax.
Response
Illustrative response:
Tool calls may return
tool_use blocks and a corresponding stop reason. Do not treat these blocks as plain text.
System instructions and multi-turn conversations
Streaming
message_start → content_block_start → content_block_delta → content_block_stop → message_delta → message_stop. ping or error events may appear between them.
delta.text only when delta.type is text_delta. Tool and thinking deltas use other structures. A stream can fail after the initial HTTP 200 response, so handle error events.
Integration notes
max_tokensis required.- Send the protocol version in the
anthropic-versionheader. - Output is in
content, notchoices[0].message.content. - Read the error body and check troubleshooting.