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

# Quickstart

> Get an API key and make your first inference request in under two minutes.

## 1. Sign up

Visit [platform.flex.ai](https://platform.flex.ai) and create an account. Sign-up is self-serve — no approval step and no waiting list.

The one exception is a company that has claimed its own email domain and made it invitation-only. If that is yours, sign-up is refused and you need an invite from someone who already administers your organization.

## 2. Create a workspace

Signing up gives you an organization; a **workspace** is what holds API keys, usage and logs, and you create the first one yourself from the dashboard. You'll be asked which region it lives in while you do. That choice is permanent, so if you need your inference to stay in the EU, read [Regions](/inference-api/reference/regions) before you pick.

## 3. Create an API key

No card is needed for this step. On **Workspace home** in the dashboard, find **Create a new key**, name it, click **Create Key**, and copy the `sk-…` value — it's shown once.

What the key does not carry yet is money. Inference draws against your account balance, and a new account's balance is zero, so your first request comes back [`402 Payment Required`](/inference-api/reference/errors) until you fund it. That is deliberate: you can wire the key into your code, your CI and your secret store before any money is involved, and add billing when you're ready to send real traffic.

## 4. Add funds

From the dashboard's **Billing** page, add a billing address and a card. We can currently bill addresses in the European Union, the United States and India — if yours is elsewhere, the card cannot be added yet, and [support@flex.ai](mailto:support@flex.ai) can tell you where that stands. Then top up by any amount between \$5 and \$500 (€5 to €500 on an EU account). The amount you enter is the credit you get; sales tax or VAT is added on top of it at checkout. Your balance is credited once the payment settles — normally a few seconds, and the dashboard shows the top-up as pending until it does. From then on requests simply start succeeding, with no key regeneration and no restart.

Adding a card also moves the key off the free rate-limit tier. See [Billing & Quotas](/inference-api/reference/billing) for the per-minute limits, how spend is metered, and what the `402` body looks like.

<Note>
  You're billed only for what you use, at per-model rates. If your account
  carries credit — from a program, a negotiated offer, or the verified first top-up match on a US-dollar account — it draws down
  before your card is charged. See the [credits FAQ](/faq/credits).
</Note>

## 5. Make a request

Pick a text model from [the catalog](https://flex.ai/models). The examples below use `Llama-3.3-70B-Instruct-FP8`.

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.flex.ai/v1/chat/completions \
    -H "Authorization: Bearer $FLEXAI_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "Llama-3.3-70B-Instruct-FP8",
      "messages": [
        {"role": "user", "content": "In one sentence, what is FlexAI?"}
      ]
    }'
  ```

  ```python Python theme={null}
  # pip install openai
  import os
  from openai import OpenAI

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

  response = client.chat.completions.create(
      model="Llama-3.3-70B-Instruct-FP8",
      messages=[{"role": "user", "content": "In one sentence, what is FlexAI?"}],
  )
  print(response.choices[0].message.content)
  ```

  ```typescript TypeScript theme={null}
  // npm install openai
  import OpenAI from "openai";

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

  const response = await client.chat.completions.create({
    model: "Llama-3.3-70B-Instruct-FP8",
    messages: [{ role: "user", content: "In one sentence, what is FlexAI?" }],
  });
  console.log(response.choices[0].message.content);
  ```
</CodeGroup>

You should see a single-line description come back. That's it — your key works.

## Next steps

<CardGroup cols={2}>
  <Card title="Stream responses" icon="bolt" href="/inference-api/guides/streaming">
    Deliver tokens as they're generated instead of waiting for the full response.
  </Card>

  <Card title="Call tools" icon="wrench" href="/inference-api/guides/tool-use">
    Let the model invoke your functions and work with their output.
  </Card>

  <Card title="Discover models" icon="magnifying-glass" href="/inference-api/guides/model-discovery">
    Filter the live catalog from code to find the right text, vision, or embedding model.
  </Card>

  <Card title="Understand billing" icon="credit-card" href="/inference-api/reference/billing">
    Rate limits, credit exhaustion behavior, and the 402 response.
  </Card>

  <Card title="Handle errors" icon="triangle-exclamation" href="/inference-api/reference/errors">
    Every 4xx/5xx we return, with example bodies and how to recover.
  </Card>
</CardGroup>


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