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

# API quickstart

> Get your API key, verify it, list your packages, and generate proxy lines — with curl, Python, and Node.js examples.

This guide takes you from zero to a working integration: you'll get your API key, verify it works, list your packages, and generate proxy lines you can plug straight into your HTTP client.

## 1. Get your API key

1. Log in to the [dashboard](https://flameproxies.com/dashboard).
2. Open [**API docs**](https://flameproxies.com/dashboard/api-docs).
3. Copy your API key. It starts with `fp_live_` and is **shown only once** — store it somewhere secure right away.

<Warning>
  Treat your API key like a password. Don't commit it to source control or embed it in client-side code. If a key leaks, rotate or revoke it from the dashboard.
</Warning>

## 2. Verify the key

Call [`GET /api/customer/balance`](/api/account/balance). It's a quick, read-only call that confirms your key works:

<CodeGroup>
  ```bash curl theme={null}
  curl https://flameproxies.com/api/customer/balance \
    -H "Authorization: Bearer fp_live_xxx"
  ```

  ```python Python theme={null}
  import requests

  API_KEY = "fp_live_xxx"
  BASE_URL = "https://flameproxies.com/api/customer"
  HEADERS = {"Authorization": f"Bearer {API_KEY}"}

  resp = requests.get(f"{BASE_URL}/balance", headers=HEADERS)
  resp.raise_for_status()
  print(resp.json())
  ```

  ```javascript Node.js theme={null}
  const API_KEY = "fp_live_xxx";
  const BASE_URL = "https://flameproxies.com/api/customer";
  const HEADERS = { Authorization: `Bearer ${API_KEY}` };

  const resp = await fetch(`${BASE_URL}/balance`, { headers: HEADERS });
  if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
  console.log(await resp.json());
  ```
</CodeGroup>

```json theme={null}
{
  "balance": 42.5,
  "currency": "USD",
  "data_balance_gb": 3
}
```

If you get an `unauthorized` error instead, check that the header is exactly `Authorization: Bearer <key>` and that the key hasn't been revoked.

## 3. List your packages

<CodeGroup>
  ```bash curl theme={null}
  curl https://flameproxies.com/api/customer/my-packages \
    -H "Authorization: Bearer fp_live_xxx"
  ```

  ```python Python theme={null}
  resp = requests.get(f"{BASE_URL}/my-packages", headers=HEADERS)
  resp.raise_for_status()

  for pkg in resp.json()["packages"]:
      print(pkg["package_id"], pkg["plan"], pkg["username"])
  ```

  ```javascript Node.js theme={null}
  const pkgResp = await fetch(`${BASE_URL}/my-packages`, { headers: HEADERS });
  if (!pkgResp.ok) throw new Error(`HTTP ${pkgResp.status}`);

  const { packages } = await pkgResp.json();
  for (const pkg of packages) console.log(pkg.package_id, pkg.plan, pkg.username);
  ```
</CodeGroup>

```json theme={null}
{
  "packages": [
    {
      "id": 123,
      "package_id": 123,
      "internal_id": "70437286-78a1-427c-b9fd-c299baadf3a9",
      "subuser_id": "56789",
      "plan": "premium_residential",
      "username": "fp-user",
      "created_at": "2026-05-13T12:00:00.000Z",
      "end_date": null,
      "is_primary": true,
      "api_created": true
    }
  ]
}
```

Grab the `package_id` of the package you want to use — you'll need it in the next step.

## 4. Generate proxy lines

The [generate endpoint](/api/proxies/generate) builds proxy lines for you, with targeting and session parameters already encoded — no need to write the username format by hand. Generating proxies doesn't cost anything.

<CodeGroup>
  ```bash curl theme={null}
  curl https://flameproxies.com/api/customer/proxies/generate \
    -H "Authorization: Bearer fp_live_xxx" \
    -H "Content-Type: application/json" \
    -d '{"package_id":123,"quantity":10,"country":"US","proxy_type":"sticky","format":"http_url"}'
  ```

  ```python Python theme={null}
  resp = requests.post(
      f"{BASE_URL}/proxies/generate",
      headers=HEADERS,
      json={
          "package_id": 123,
          "quantity": 10,
          "country": "US",
          "proxy_type": "sticky",
          "format": "http_url",
      },
  )
  resp.raise_for_status()
  proxies = resp.json()["proxies"]
  print(proxies[0])
  ```

  ```javascript Node.js theme={null}
  const genResp = await fetch(`${BASE_URL}/proxies/generate`, {
    method: "POST",
    headers: { ...HEADERS, "Content-Type": "application/json" },
    body: JSON.stringify({
      package_id: 123,
      quantity: 10,
      country: "US",
      proxy_type: "sticky",
      format: "http_url",
    }),
  });
  if (!genResp.ok) throw new Error(`HTTP ${genResp.status}`);

  const { proxies } = await genResp.json();
  console.log(proxies[0]);
  ```
</CodeGroup>

```json theme={null}
{
  "package_id": 123,
  "internal_id": "70437286-78a1-427c-b9fd-c299baadf3a9",
  "subuser_id": "56789",
  "plan": "residential",
  "count": 10,
  "proxies": [
    "http://username:password@proxy.flameproxies.com:8989"
  ]
}
```

## 5. Use them

Each line in `proxies` is a standard proxy URL. Pass it to any HTTP client:

<CodeGroup>
  ```bash curl theme={null}
  curl -x "http://username:password@proxy.flameproxies.com:8989" https://ipinfo.io/json
  ```

  ```python Python theme={null}
  proxy = proxies[0]
  resp = requests.get("https://ipinfo.io/json", proxies={"http": proxy, "https": proxy})
  print(resp.json())
  ```
</CodeGroup>

You're routed through a US residential IP. From here you can change the location, session length, pool, and modes with the same endpoint's fields.

## Next steps

<CardGroup cols={2}>
  <Card title="Generate proxies" icon="plug" href="/api/proxies/generate">
    Every targeting, session, and format option.
  </Card>

  <Card title="Create an order" icon="cart-shopping" href="/api/orders/create">
    Create new packages from your wallet balance.
  </Card>

  <Card title="Error handling" icon="triangle-exclamation" href="/api/errors">
    Error codes and how to handle each one.
  </Card>

  <Card title="Rate limits" icon="gauge-high" href="/api/rate-limits">
    Stay under the limit and retry gracefully.
  </Card>
</CardGroup>
