Anthropic integration

Create completion (Anthropic legacy format)

POST/anthropic/v1/complete

Creates a text completion using Anthropic's legacy Complete API. Supports streaming via SSE.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "http://localhost:8080/anthropic/v1/complete" \  -H "Content-Type: application/json" \  -d '{    "model": "string",    "prompt": "string",    "max_tokens_to_sample": 0  }'
{
  "type": "completion",
  "id": "string",
  "completion": "string",
  "stop_reason": "stop_sequence",
  "model": "string",
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0
  }
}
{
  "type": "error",
  "error": {
    "type": "string",
    "message": "string"
  }
}
{
  "type": "error",
  "error": {
    "type": "string",
    "message": "string"
  }
}