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

# Quickstart

> Build with LLM7.io in minutes: chat, images, and videos.

## Get started in two steps

Spin up the OpenAI SDK against the LLM7.io endpoint and make your first requests.

### Step 1: Set up

> [accordion] Install the SDK
>
> ```bash theme={null}
> pip install openai
> ```

> [accordion] Configure the client
>
> The OpenAI SDK requires an API token from [dash.llm7.io](https://dash.llm7.io/).
>
> ```python theme={null}
> import openai
>
> client = openai.OpenAI(
>     base_url="https://api.llm7.io/v1",
>     api_key="YOUR_LLM7_API_TOKEN",
> )
> ```

### Step 2: Text generation

> [accordion] Chat completions (Python)
>
> ```python theme={null}
> import openai
>
> client = openai.OpenAI(
>     base_url="https://api.llm7.io/v1",
>     api_key="YOUR_LLM7_API_TOKEN",
> )
>
> resp = client.chat.completions.create(
>     model="default",  # or "fast", "pro", or a model ID from /v1/models
>     messages=[
>         {"role": "user", "content": "Tell me a short story about a brave squirrel."}
>     ],
> )
>
> print(resp.choices[0].message.content)
> ```
>
> The output will be a short story generated by the model, for example:
>
> ```
> Once upon a time, in a lush green forest, there lived a brave squirrel named Sammy. Sammy was known for his adventurous spirit and his willingness to help others. One day, a fierce storm hit the forest, causing a massive tree to fall and block the entrance to the squirrel village. Without hesitation, Sammy gathered his friends and devised a plan to clear the path. With teamwork and determination, they managed to move the fallen tree and restore access to their home. The villagers celebrated Sammy's bravery, and he became a legend in the forest for his courageous act.
> ```

## Next steps

> [card] [Function calling](https://docs.llm7.io/guides/function-calling.md)
>
> Bind tool calls to your own functions reliably.

> [card] [JSON mode](https://docs.llm7.io/guides/json-mode.md)
>
> Get guaranteed JSON outputs for structured use-cases.

> [card] [Streaming](https://docs.llm7.io/guides/streaming.md)
>
> Stream tokens for lower latency UIs.

> [card] [Available models](https://docs.llm7.io/guides/models.md)
>
> Choose selectors and see model options.

> [card] [Models API](https://docs.llm7.io/guides/models-api.md)
>
> Read live pricing, context windows, and model capabilities.

> [card] [Image generation and edits](https://docs.llm7.io/guides/image-generation.md)
>
> Generate images from prompts or edit reference images.

> [card] [Video generation](https://docs.llm7.io/guides/video-generation.md)
>
> Create asynchronous video tasks from prompts or reference images.

> [!NOTE]
>
> **Need help?** Check the API reference above or join the community.


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