Create completion (Anthropic legacy format)
/anthropic/v1/completeCreates 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"
}
}Create batch job (Anthropic format) POST
Creates a batch processing job using Anthropic format. Use x-model-provider header to specify the provider.
Create message (Anthropic format) POST
Creates a message using Anthropic Messages API format. Supports streaming via SSE. Async inference: Send x-bf-async: true to submit the request as a background job and receive a job ID immediately. Poll with x-bf-async-id: <job-id> to retrieve the result. When the job is still processing, the response will have an empty content array. When completed, content will contain the full result. See Async Inference for details.