Title: LLM API %C4%81tr%C4%81 s%C4%81k%C5%A1ana: pirmais izsaukums %E2%80%94 LLM EU Canonical: https://llmeu.com/lv/docs/quickstart/ Markdown mirror: https://llmeu.com/lv/docs/quickstart.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/) # %C4%80tr%C4%81 s%C4%81k%C5%A1ana - Create an account in the[console](https://app.llmeu.com/app/signup) and copy the API key %E2%80%94 it is shown once. - Point any OpenAI-compatible client at `https://api.llmeu.com/v1`. - Call `llmeu-auto` and read the `llmeu` block in the response. ## cURL ``` curl https://api.llmeu.com/v1/chat/completions \ -H "Authorization: Bearer $LLMEU_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "llmeu-auto", "messages": [{"role": "user", "content": "Say hello from EU hosting."}], "llmeu": {"residency": "eu-hosted", "task": "general"} }' ``` ## Python ``` from openai import OpenAI client = OpenAI(base_url="https://api.llmeu.com/v1", api_key="llmeu_live_xxxxxxxx.your-secret") resp = client.chat.completions.create( model="llmeu-auto", messages=[{"role": "user", "content": "Say hello from EU hosting."}], ) print(resp.choices[0].message.content) print(resp.llmeu.inference_region, resp.llmeu.trace_id) ``` ## JavaScript ``` import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.llmeu.com/v1", apiKey: process.env.LLMEU_API_KEY }); const resp = await client.chat.completions.create({ model: "llmeu-auto", messages: [{ role: "user", content: "Say hello from EU hosting." }], }); console.log(resp.choices[0].message.content); console.log(resp.llmeu.inference_region); ``` ## API atsauce ## Pier%C4%81d%C4%ABjumi un p%C4%81rbaude Every response carries a `llmeu` block: `trace_id`, `model_used`, `inference_region`, `sovereignty_class`, `route_reason` and the retention that applied. Fetch the full row with `GET /platform/v1/traces/{id}`. Cenas tiek re%C4%A3istr%C4%93tas katram galapunktam un par%C4%81d%C4%ABtas par miljonu mar%C4%B7ieru. Modelis bez akt%C4%ABva galapunkta ir tikai katalog%C4%81: to %C5%A1eit nevar izsaukt, un par to nekas netiek iekas%C4%93ts.