// Default: https://api.auriko.ai/v1// Override for self-hosted or proxy setups:const client = new Client({ baseUrl: "https://your-proxy.example.com/v1",});
Valid metadata fields: user_id, tags (list), trace_id, and custom_fields (object for arbitrary key-value pairs). See the TypeScript SDK Reference for field constraints.
Error objects also carry responseHeaders. Use e.responseHeaders.requestId when filing support tickets to correlate with server logs.See the TypeScript SDK Reference for the complete ResponseHeaders API.
Availability depends on the provider. completion_tokens_details.reasoning_tokens is present for OpenAI o-series, DeepSeek, xAI, and Google Gemini. It’s undefined for providers that don’t report reasoning token counts (Anthropic, Moonshot, Fireworks).See Check reasoning token availability for the full breakdown.
The Auriko SDK covers: inference (chat completions and the Response API, both with routing), identity, and model discovery. For full platform operations, use the REST API directly. If you use the Vercel AI SDK, see @auriko/ai-sdk-provider instead.
import { Client } from "@auriko/sdk";// Pass API key from your backend - never expose in client-side code!const client = new Client({ apiKey: apiKeyFromBackend,});
Never expose your API key in client-side code. Use a backend proxy instead.