Skip to main content
Sunra provides four LLM API endpoints for text generation and embeddings. They use the same authentication and base URL (https://api-llm.sunra.ai), so you can pick the format that fits your stack. Before diving in, grab an API key from your dashboard. Use canonical model IDs in requests. Sunra selects a provider automatically when provider is omitted; see Provider routing when you need to choose or prioritize providers.

Chat Completions — /v1/chat/completions

The Chat Completions endpoint follows the OpenAI Chat Completions format. It accepts a list of messages with roles (system, user, assistant) and returns a completion. Use this endpoint when you want drop-in compatibility with OpenAI SDKs and tooling. Key features: streaming, function calling, vision (images, audio, video, files), reasoning, structured outputs (JSON schema / grammar), logprobs.

Anthropic Messages — /v1/messages

The Anthropic Messages endpoint follows the Anthropic Messages API format. It uses user / assistant message roles with rich content blocks and a separate system parameter. Use this endpoint when you want native access to Anthropic Claude models and features like extended thinking, prompt caching, citations, and built-in tools (web search, code execution). Key features: streaming, extended thinking, prompt caching, tool use (custom + built-in), PDF/document input, citations, structured outputs.

Responses — /v1/responses

The Responses endpoint follows the OpenAI Responses API format. It accepts flexible input items (messages, function calls, reasoning) and returns structured output items. Use this endpoint when you need the latest OpenAI Responses features like built-in web search, file search, code interpreter, computer use, MCP tool integration, or image generation. Key features: streaming, function calling, web search, file search, code interpreter, computer use, MCP tools, image generation, reasoning, structured outputs.

Embeddings — /v1/embeddings

The Embeddings endpoint follows the OpenAI Embeddings format. It creates vectors from text and supported media inputs for retrieval, semantic search, clustering, classification, and RAG.

Choosing the right endpoint

All four endpoints share the same authentication. Pass your API key as a Bearer token in the Authorization header.