Title: API atsauce %E2%80%94 LLM EU Canonical: https://llmeu.com/lv/docs/api/ Markdown mirror: https://llmeu.com/lv/docs/api.md Machine-readable: https://llmeu.com/llms.txt (index) - https://llmeu.com/llms-full.txt (full catalogue) - https://llmeu.com/llms-catalogue.json Darba s%C4%81k%C5%A1ana - [%C4%80tr%C4%81 s%C4%81k%C5%A1ana](/lv/docs/quickstart/) - [Konsole](/lv/docs/console/) - [Migr%C4%81cija](/lv/docs/migration/) - [API atsauce](/lv/docs/api/) Atsauce - [Autentifik%C4%81cija](/lv/docs/authentication/) - [Galapunkti](/lv/docs/endpoints/) - [K%C4%BC%C5%ABdas](/lv/docs/errors/) - [Piepras%C4%ABjumu bie%C5%BEuma ierobe%C5%BEojumi](/lv/docs/rate-limits/) - [Straum%C4%93%C5%A1ana](/lv/docs/streaming/) - [Politikas](/lv/docs/policies/) - [Mar%C5%A1rut%C4%93%C5%A1ana un politika](/lv/docs/routing/) - [Rezidence un re%C4%A3ioni](/lv/docs/residency/) - [Pier%C4%81d%C4%ABjumi un p%C4%81rbaude](/lv/docs/evidence/) - [OpenAI sader%C4%ABba](/lv/docs/openai-compat/) Ekspluat%C4%81cija - [Pa%C5%A1mitin%C4%81%C5%A1ana](/lv/docs/self-hosting/) # API atsauce One base URL, one bearer token, two surfaces. ## Chat completions Standard fields are accepted: `model`, `messages`, `temperature`, `top_p`, `max_tokens`, `stream`, `stop`, `presence_penalty`, `frequency_penalty`, `user`, `tools`, `tool_choice`, `response_format`, `seed`. ## LLM EU extensions A namespaced `llmeu` object in the request body. Official SDKs ignore unknown fields, so adding it never breaks a client. ``` "llmeu": { "residency": "eu-hosted" | "eu-owned" | "de" | "any", "task": "general" | "coding" | "reasoning" | "translation" | "vision" | "cheap" | "legal-draft" | "rag", "retention": "zero", "data_class": "public" | "internal" | "confidential" | "restricted", "policy_id": "uuid", "max_usd_per_1m": 0.5, "allow_partners": false } ``` Only zero retention is implemented. Policies can store 24h, 7d or 30d choices; this does not enable storage. A request exceeding the policy first returns 403 retention_exceeds_policy; an allowed effective retention other than zero returns 501 retention_not_implemented. ## Response Standard OpenAI shape, plus: ``` { "choices": [...], "usage": {...}, "llmeu": { "trace_id": "%E2%80%A6", "model_used": "%E2%80%A6", "model_version": "%E2%80%A6", "provider": "%E2%80%A6", "endpoint_id": "%E2%80%A6", "inference_region": "de-fra", "sovereignty_class": "eu_owned_eu_operated", "route_reason": "auto routing for task \"coding\" + residency eu-hosted + %E2%80%A6", "policy_id": "%E2%80%A6", "retention": "zero", "cost_estimate_usd": 0.000123 } } ``` ## K%C4%BC%C5%ABdas The complete code table, with the status, the type and what to do about each one, is at[K%C4%BC%C5%ABdas](/lv/docs/errors/) %E2%80%94 rendered from the same source the API uses. ## Galapunkti Every mounted route, with the credential it needs, is at [Galapunkti](/lv/docs/endpoints/). ``` GET https://api.llmeu.com/platform/v1/me GET https://api.llmeu.com/platform/v1/api-keys POST https://api.llmeu.com/platform/v1/api-keys DELETE https://api.llmeu.com/platform/v1/api-keys/{id} GET https://api.llmeu.com/platform/v1/traces?limit=50 GET https://api.llmeu.com/platform/v1/traces/{id} GET https://api.llmeu.com/platform/v1/usage?days=30 GET https://api.llmeu.com/platform/v1/policies POST https://api.llmeu.com/platform/v1/policies PUT https://api.llmeu.com/platform/v1/policies/{id} ```