# How to Use: Part 2

## 1. API Keys

![API Keys screen](/files/pAdsMZcrpLIUgFsNluOh)

Navigate to **API Keys** from the left sidebar.

![Create API Key](/files/pXqsY4mO1kQlQwdcXjQ0)

Enter a name for your key and click **"+ New key"**. The new API key will be issued immediately.

Copy the key right away — it is displayed only once.

![API key list](/files/kBXJgkuRzG0pbr9Lsr7T)

Previously issued keys can be viewed and managed in the list below. Use the action icons to copy, reveal, or delete a key.

> Keep your API key secret. Do not share it or commit it to public repositories.

## 2. Using the API

![Using the API](/files/esv5IqBoDdayEPk0pTka)

StarLLM provides an **OpenAI-compatible API**. You can use any OpenAI client by simply changing the `baseURL` and `apiKey`:

```bash
curl https://api.starllm.org/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemma4-31b-it",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
```

Because the API is fully OpenAI-compatible, you can connect it to any client or agent that supports custom OpenAI providers. Below is an example integration with [**Kilo Code**](https://kilo.ai), an open-source AI coding agent.

![Kilo Code provider settings](/files/FseiaYBIQs2B59I6wKCz)

Set the **Base URL** to `https://api.starllm.org/v1` and enter your StarLLM API key.

![Kilo Code integration in action](/files/5DuUiLFzfEAEFXN2vGqL)

Once configured, you can start using StarLLM-powered models directly inside Kilo Code for coding assistance, code review, and more.


---

# Agent Instructions: 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:

```
GET https://starllm-org.gitbook.io/litepaper/how-to-use-02.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
