Skip to main content
The examples on this page use https://api.llm.kiwi/v1 and the OpenAI-compatible chat completions interface.
Keep API keys on a trusted server. Never place a private key in public Git repositories or browser-side JavaScript.

Set your API key

Basic chat completion

System instructions

Use a system message to define the assistant’s role, output style, or constraints.
Keep system instructions focused. If your application needs a strict format, validate the returned content instead of assuming the model always follows instructions perfectly.

Continue a conversation

The API is stateless: include relevant earlier messages on every request.

Stream a response

Streaming lets your application display text as it is generated.

Croatian response

Select hrllm and write the request in Croatian:

Handle errors

Retry rate limits and temporary server errors with a delay. Do not automatically retry invalid requests or authentication errors.

SDK setup

Install and configure supported client libraries.

Troubleshooting

Fix authentication, request, and connection problems.
Last modified on July 28, 2026