Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

docs - Send `litellm_metadata` (tags)

Ishaan Jaff14124bab45d2
diff --git a/docs/my-website/docs/pass_through/anthropic_completion.md b/docs/my-website/docs/pass_through/anthropic_completion.md
index 320527580bc..3f247adbd05 100644
--- a/docs/my-website/docs/pass_through/anthropic_completion.md
+++ b/docs/my-website/docs/pass_through/anthropic_completion.md
@@ -314,4 +314,58 @@ curl --request POST \
{"role": "user", "content": "Hello, world"}
]
}'
-```
\ No newline at end of file
+```
+
+
+### Send `litellm_metadata` (tags)
+
+<Tabs>
+<TabItem value="curl" label="curl">
+
+```bash
+curl --request POST \
+ --url http://0.0.0.0:4000/anthropic/v1/messages \
+ --header 'accept: application/json' \
+ --header 'content-type: application/json' \
+ --header "Authorization: bearer sk-anything" \
+ --data '{
+ "model": "claude-3-5-sonnet-20241022",
+ "max_tokens": 1024,
+ "messages": [
+ {"role": "user", "content": "Hello, world"}
+ ],
+ "litellm_metadata": {
+ "tags": ["test-tag-1", "test-tag-2"]
+ }
+ }'
+```
+
+</TabItem>
+<TabItem value="python" label="Anthropic Python SDK">
+
+```python
+from anthropic import Anthropic
+
+client = Anthropic(
+ base_url="http://0.0.0.0:4000/anthropic",
+ api_key="sk-anything"
+)
+
+response = client.messages.create(
+ model="claude-3-5-sonnet-20241022",
+ max_tokens=1024,
+ messages=[
+ {"role": "user", "content": "Hello, world"}
+ ],
+ extra_body={
+ "litellm_metadata": {
+ "tags": ["test-tag-1", "test-tag-2"]
+ }
+ }
+)
+
+print(response)
+```
+
+</TabItem>
+</Tabs>
\ No newline at end of file