Speko Docs
API Reference

Complete

Single-turn LLM call routed to the best provider for your intent, with automatic failover. Returns assistant text + token usage.

POST
/v1/complete

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

text/event-stream

application/json

application/json

application/json

"string"
{
  "error": "Invalid request body",
  "code": "VALIDATION_ERROR"
}
{
  "error": "Unauthorized",
  "code": "UNAUTHORIZED"
}
{
  "error": "All providers failed",
  "code": "COMPLETE_FAILED"
}