> ## 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

<AccordionGroup>
  <Accordion icon="rectangle-terminal" title="Install the SDK">
    ```bash theme={null}
    pip install openai
    ```
  </Accordion>

  <Accordion icon="key" title="Configure the client" defaultOpen>
    The OpenAI SDK requires an `api_key` value. Use a token from [dash.llm7.io](https://dash.llm7.io/) for higher limits, or use `unused` for anonymous access.

    ```python theme={null}
    import openai

    client = openai.OpenAI(
        base_url="https://api.llm7.io/v1",
        api_key="unused",  # Use a https://dash.llm7.io/ token for higher limits.
    )
    ```
  </Accordion>
</AccordionGroup>

### Step 2: Text generation

<AccordionGroup>
  <Accordion icon="square-code" title="Chat completions (Python)" defaultOpen>
    ```python theme={null}
    import openai

    client = openai.OpenAI(
        base_url="https://api.llm7.io/v1",
        api_key="unused",  # Use a https://dash.llm7.io/ token for higher limits.
    )

    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.
    ```
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Function calling" icon="brackets-curly" href="/guides/function-calling">
    Bind tool calls to your own functions reliably.
  </Card>

  <Card title="JSON mode" icon="code" href="/guides/json-mode">
    Get guaranteed JSON outputs for structured use-cases.
  </Card>

  <Card title="Streaming" icon="bolt" href="/guides/streaming">
    Stream tokens for lower latency UIs.
  </Card>

  <Card title="Available models" icon="box" href="/guides/models">
    Choose selectors and see model options.
  </Card>

  <Card title="Models API" icon="list" href="/guides/models-api">
    Read live pricing, context windows, and model capabilities.
  </Card>

  <Card title="Image generation and edits" icon="image" href="/guides/image-generation">
    Generate images from prompts or edit reference images.
  </Card>

  <Card title="Video generation" icon="video" href="/guides/video-generation">
    Create asynchronous video tasks from prompts or reference images.
  </Card>
</CardGroup>

<Note>
  **Need help?** Check the API reference above or join the community.
</Note>
