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

# Liquid API

> Get started with the Liquid API in minutes: one API key, familiar SDKs, and a few lines of code for text, vision, audio, and decisions.

## Developer quickstart

Make your first request in minutes. The API speaks OpenAI's protocol, so the official OpenAI SDKs work with a new base URL.

> [card] [Get started](https://docs.liquid.ai/api/quickstart.md)
>
> Create a key, install the SDK, and make your first call.

> [card] [Create API key](https://console.liquid.ai/dashboard/api-keys)
>
> Create and manage keys in Liquid Console.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
import os

from openai import OpenAI

client = OpenAI(api_key=os.environ["LIQUID_API_KEY"], base_url="https://api.liquid.ai/openai/v1")

completion = client.chat.completions.create(
    model="lfm3-1.7b",
    messages=[{"role": "user", "content": "Write a one-sentence bedtime story about a unicorn."}],
    temperature=0.1,
    extra_body={"top_k": 50, "repetition_penalty": 1.1},
)
print(completion.choices[0].message.content)
```

```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.LIQUID_API_KEY,
  baseURL: "https://api.liquid.ai/openai/v1",
});

const completion = await client.chat.completions.create({
  model: "lfm3-1.7b",
  messages: [{ role: "user", content: "Write a one-sentence bedtime story about a unicorn." }],
  temperature: 0.1,
  // top_k and repetition_penalty are Liquid extensions to the OpenAI API
  top_k: 50,
  repetition_penalty: 1.1,
});
console.log(completion.choices[0].message.content);
```

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl https://api.liquid.ai/openai/v1/chat/completions \
  -H "Authorization: Bearer $LIQUID_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "lfm3-1.7b",
    "messages": [{"role": "user", "content": "Write a one-sentence bedtime story about a unicorn."}],
    "temperature": 0.1,
    "top_k": 50,
    "repetition_penalty": 1.1
  }'
```

## Start building

> [card] [Generate text](https://docs.liquid.ai/api/guides/text-generation.md)
>
> Prompt a model, stream replies, call tools, and get structured output.

> [card] [Understand images](https://docs.liquid.ai/api/guides/vision.md)
>
> Send images to vision models alongside your prompt.

> [card] [Build with audio](https://docs.liquid.ai/api/guides/audio.md)
>
> Transcribe speech and get spoken replies.

> [card] [Make decisions](https://docs.liquid.ai/api/guides/decisions.md)
>
> Classify, route, and score with calibrated probabilities.

> [card] [Run batch jobs](https://docs.liquid.ai/api/guides/batch.md)
>
> Process large request files asynchronously.

## Resources

> [card] [API reference](https://docs.liquid.ai/api/reference/overview.md)
>
> Every endpoint, with request and response schemas.

> [card] [Models](https://docs.liquid.ai/api/models.md)
>
> Compare inputs, outputs, and context windows.

> [card] [Liquid Console](https://console.liquid.ai)
>
> Manage API keys, models, usage, and billing.

> [card] [Cookbook](https://github.com/Liquid4All/cookbook)
>
> Open-source examples and guides.

> [card] [Discord](https://discord.gg/DFU3WQeaYD)
>
> Ask questions and talk with other developers.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.