> ## Documentation Index
> Fetch the complete documentation index at: https://docs.llm.kiwi/llms.txt
> Use this file to discover all available pages before exploring further.

# LLM.kiwi documentation

> Get started with LLM.kiwi, the free OpenAI-compatible chat completion API. Learn to create a key, send your first request, and build real applications.

# Build with LLM.kiwi

Add AI chat and text generation to your application through a free OpenAI-compatible API. No credit card, local model, or GPU is required.

<CardGroup cols={3}>
  <Card title="Free access" icon="heart">
    Create an account and begin without a credit card.
  </Card>

  <Card title="OpenAI-compatible" icon="plug">
    Use familiar chat completions clients with a custom base URL.
  </Card>

  <Card title="Croatian support" icon="language">
    Select `hrllm` for Croatian-focused generation.
  </Card>
</CardGroup>

## Start here

<Steps>
  <Step title="Create a free API key">
    Sign in at [llm.kiwi/login](https://llm.kiwi/login), open the [dashboard](https://llm.kiwi/dashboard), and create a key beginning with `sk_kiwi_`.
  </Step>

  <Step title="Make one test request">
    Follow the [Quickstart](/quickstart) using cURL, Python, or Node.js. It includes installation steps and expected output.
  </Step>

  <Step title="Move the key into an environment variable">
    Do not leave a private key inside source code. The quickstart shows the commands for macOS, Linux, and Windows PowerShell.
  </Step>

  <Step title="Build a small feature">
    Choose a pattern from [Use cases](/use-cases), then apply the security and reliability checklist in [Best practices](/best-practices).
  </Step>
</Steps>

<Card title="New to APIs and AI?" icon="graduation-cap" href="/concepts">
  Read Core concepts for plain-English explanations of endpoints, headers, JSON, messages, models, tokens, responses, and errors.
</Card>

## Your first request

```bash theme={null}
curl "https://api.llm.kiwi/v1/chat/completions" \
  -H "Authorization: Bearer sk_kiwi_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "messages": [
      {"role": "user", "content": "Reply with: Hello from LLM.kiwi!"}
    ]
  }'
```

A successful response contains the answer at `choices[0].message.content`.

<Warning>
  The key shown above is a placeholder. Use your real key only in a local test, then store it in an environment variable. Never expose it in frontend code or a public repository.
</Warning>

## Choose what you need

<CardGroup cols={2}>
  <Card title="I want my first working call" icon="rocket" href="/quickstart">
    Complete setup from account creation to expected output.
  </Card>

  <Card title="I need working code" icon="code" href="/examples">
    Copy server-side Python, Node.js, cURL, and streaming examples.
  </Card>

  <Card title="I need endpoint details" icon="brackets-curly" href="/api-reference">
    Review request fields, response fields, authentication, and statuses.
  </Card>

  <Card title="Something is failing" icon="wrench" href="/troubleshooting">
    Diagnose keys, JSON, URLs, SDK settings, limits, and timeouts.
  </Card>
</CardGroup>

## Essential values

| Setting                    | Value                                |
| -------------------------- | ------------------------------------ |
| Base URL                   | `https://api.llm.kiwi/v1`            |
| Chat endpoint              | `POST /v1/chat/completions`          |
| Models endpoint            | `GET /v1/models`                     |
| Authentication             | `Authorization: Bearer YOUR_API_KEY` |
| Recommended starting model | `auto`                               |
| Croatian-focused model     | `hrllm`                              |

## Before real users depend on it

* Keep API calls and keys on your backend.
* Set a request timeout.
* Retry only temporary failures with bounded backoff.
* Limit input size and conversation history.
* Validate generated output before using it.
* Avoid sending secrets or unnecessary personal data.
* Provide a useful fallback when the API is unavailable.

<CardGroup cols={3}>
  <Card title="Best practices" icon="shield-halved" href="/best-practices">
    Security and production-readiness checklist.
  </Card>

  <Card title="Limits" icon="gauge" href="/limits">
    Rate limits, token usage, and efficient requests.
  </Card>

  <Card title="FAQ" icon="circle-question" href="/faq">
    Short answers to common integration questions.
  </Card>
</CardGroup>
