You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1343,6 +1344,77 @@ See [OpenAI Embeddings API documentation](https://platform.openai.com/docs/api-r
1343
1344
}'
1344
1345
```
1345
1346
1347
+
### POST `/v1/messages`: Anthropic-compatible Messages API
1348
+
1349
+
Given a list of `messages`, returns the assistant's response. Streaming is supported via Server-Sent Events. While no strong claims of compatibility with the Anthropic API spec are made, in our experience it suffices to support many apps.
1350
+
1351
+
*Options:*
1352
+
1353
+
See [Anthropic Messages API documentation](https://docs.anthropic.com/en/api/messages). Tool use requires `--jinja` flag.
1354
+
1355
+
`model`: Model identifier (required)
1356
+
1357
+
`messages`: Array of message objects with `role` and `content` (required)
1358
+
1359
+
`max_tokens`: Maximum tokens to generate (default: 4096)
1360
+
1361
+
`system`: System prompt as string or array of content blocks
1362
+
1363
+
`temperature`: Sampling temperature 0-1 (default: 1.0)
1364
+
1365
+
`top_p`: Nucleus sampling (default: 1.0)
1366
+
1367
+
`top_k`: Top-k sampling
1368
+
1369
+
`stop_sequences`: Array of stop sequences
1370
+
1371
+
`stream`: Enable streaming (default: false)
1372
+
1373
+
`tools`: Array of tool definitions (requires `--jinja`)
0 commit comments