> For the complete documentation index, see [llms.txt](https://docs.kontinent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kontinent.ai/documentation/dokumentation/readme.md).

# Schnellstart

Kontinent ist ein einziger OpenAI-kompatibler Endpunkt vor EU-ansässigen Modellanbietern (Mistral, Scaleway, OVHcloud, IONOS, Azure EU Data Zone), mit Prepaid-Guthaben, Rate-Limits pro Schlüssel und prinzipbedingt keiner Speicherung von Prompts.

Wenn Sie bereits mit OpenAI kommunizieren, gibt es nichts Neues zu lernen. Sie ändern nur zwei Dinge: die Basis-URL und den API-Schlüssel. Nachrichten, Tools, Streaming und das Antwortformat bleiben genau so, wie Sie sie geschrieben haben.

{% hint style="success" %}
**Geschätzte Zeit: 1 Minute.** Sie brauchen nur einen `sk-kt-`-Schlüssel und eine Modell-ID.
{% endhint %}

## Schritte

{% stepper %}
{% step %}

#### Basis-URL und Schlüssel setzen

{% tabs %}
{% tab title="TypeScript" %}

```typescript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.kontinent.ai/v1",
  apiKey: process.env.KONTINENT_API_KEY, // sk-kt-...
});
```

{% endtab %}

{% tab title="Python" %}

```python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.kontinent.ai/v1",
    api_key=os.environ["KONTINENT_API_KEY"],
)
```

{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

#### Eine Chat-Completion senden

{% tabs %}
{% tab title="TypeScript" %}

```typescript
const res = await client.chat.completions.create({
  model: "mistral/mistral-large-latest",
  messages: [{ role: "user", content: "Hallo!" }],
});
console.log(res.choices[0].message.content);
```

{% endtab %}

{% tab title="Python" %}

```python
res = client.chat.completions.create(
    model="mistral/mistral-large-latest",
    messages=[{"role": "user", "content": "Hallo!"}],
)
print(res.choices[0].message.content)
```

{% endtab %}

{% tab title="curl" %}

```bash
curl https://api.kontinent.ai/v1/chat/completions \
  -H "Authorization: Bearer $KONTINENT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"mistral/mistral-large-latest",
       "messages":[{"role":"user","content":"Hallo!"}]}'
```

{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

#### Die Antwort streamen

Setzen Sie `stream: true`, um Server-Sent Events zu empfangen, während das Modell generiert.

```typescript
const stream = await client.chat.completions.create({
  model: "mistral/mistral-small-latest",
  messages: [{ role: "user", content: "Write a haiku about Europe." }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}
```

Siehe [Streaming](/documentation/dokumentation/features/streaming.md) für das SSE-Wire-Format und das Timeout-Verhalten.
{% endstep %}

{% step %}

#### Das passende Modell wählen

Modell-IDs haben die Form `provider/model`, z. B. `mistral/mistral-large-latest`. Entdecken Sie mit einem Aufruf, was Ihre Organisation nutzen kann, inklusive EUR-Preisen und Souveränitätsstufe:

```bash
curl https://api.kontinent.ai/v1/models \
  -H "Authorization: Bearer $KONTINENT_API_KEY"
```

{% endstep %}
{% endstepper %}

## Warum Kontinent

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h4><i class="fa-earth-europe" style="color:$primary;">:earth-europe:</i></h4></td><td><h4>EU-Datenresidenz</h4></td><td>Anfragen werden von EU-ansässigen Anbietern bedient. Jedes Modell trägt eine <code>sovereignty</code>-Stufe, sodass Sie einen EU-eigenen Anbieter erzwingen können.</td><td><a href="/pages/LPSVNkKoP0HQfECoQl3y">/pages/LPSVNkKoP0HQfECoQl3y</a></td></tr><tr><td><h4><i class="fa-shield-halved" style="color:$primary;">:shield-halved:</i></h4></td><td><h4>Keine Speicherung</h4></td><td>Prompt- und Completion-Inhalte werden nie gespeichert oder geloggt. Nur Token-Anzahl, Latenz, Status, Modell und Kosten.</td><td><a href="/pages/QGAakCpYw9BOUXw4UKsC">/pages/QGAakCpYw9BOUXw4UKsC</a></td></tr><tr><td><h4><i class="fa-plug" style="color:$primary;">:plug:</i></h4></td><td><h4>Nahtlos kompatibel</h4></td><td>Bewusst OpenAI-kompatibel. Jedes OpenAI-SDK funktioniert, indem Sie die <code>baseURL</code> auf Kontinent zeigen lassen.</td><td><a href="/pages/FRkrkEsnXOE5T7eNF8jd">/pages/FRkrkEsnXOE5T7eNF8jd</a></td></tr></tbody></table>

## Nächste Schritte

{% content-ref url="/pages/cKerBdTJmzUZuO2YB1S8" %}
[Prinzipien](/documentation/dokumentation/overview/principles.md)
{% endcontent-ref %}

{% content-ref url="/pages/Pc1PnBhujjeKjhpJsNqT" %}
[Authentifizierung](/documentation/dokumentation/overview/authentication.md)
{% endcontent-ref %}

{% content-ref url="/pages/LPSVNkKoP0HQfECoQl3y" %}
[Modelle & Souveränität](/documentation/dokumentation/models-and-routing/models.md)
{% endcontent-ref %}

{% content-ref url="/pages/7R1ViKCJpzbvV0OeM7nk" %}
[Fehler behandeln](/documentation/dokumentation/features/errors.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.kontinent.ai/documentation/dokumentation/readme.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
