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

# Quickstart

> Create an API key and make your first request

## 1. Register and create a key

[Create an account](https://api.bianxie.ai/register), then create a key in [Key management](https://api.bianxie.ai/keys). Keep it on your server.

## 2. Set an environment variable

```bash theme={null}
export BIANXIE_API_KEY="API_KEY"
```

## 3. Make a request

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.bianxie.ai/v1/chat/completions \
    -H "Authorization: Bearer $BIANXIE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"model":"your-model","messages":[{"role":"user","content":"Hello!"}]}'
  ```

  ```python Python theme={null}
  from openai import OpenAI
  client = OpenAI(base_url="https://api.bianxie.ai/v1", api_key="API_KEY")
  result = client.chat.completions.create(model="your-model", messages=[{"role": "user", "content": "Hello!"}])
  print(result.choices[0].message.content)
  ```

  ```javascript Node.js theme={null}
  import OpenAI from "openai";
  const client = new OpenAI({ baseURL: "https://api.bianxie.ai/v1", apiKey: process.env.BIANXIE_API_KEY });
  const result = await client.chat.completions.create({ model: "your-model", messages: [{ role: "user", content: "Hello!" }] });
  console.log(result.choices[0].message.content);
  ```
</CodeGroup>
