Skip to content
LLMFLUX

Get started

Quickstart

Make an authenticated, server-side request to the LLMFLUX gateway.

Set up

Create an API key in the dashboard, complete any required Telegram verification, and ensure the account has credit. Keep the key on your server.

export LLMFLUX_API_KEY="YOUR_GATEWAY_KEY"
export LLMFLUX_MODEL="YOUR_MODEL_ID"

Discover models

Choose a compatible enabled ID from the authenticated model list, then replace YOUR_MODEL_ID or set LLMFLUX_MODEL. Do not assume a model name from another provider is available unchanged.

curl https://api.llmflux.dev/v1/models \
  -H "Authorization: Bearer $LLMFLUX_API_KEY"

Send a request

curl https://api.llmflux.dev/v1/chat/completions \
  -H "Authorization: Bearer $LLMFLUX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "YOUR_MODEL_ID",
  "messages": [
    {
      "role": "user",
      "content": "Hello from LLMFLUX"
    }
  ],
  "stream": false
}'

A successful non-streaming chat request returns choices[].message and provider usage. See Chat completions for the full compatibility boundary.

Stream output

curl -N https://api.llmflux.dev/v1/chat/completions \
  -H "Authorization: Bearer $LLMFLUX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "YOUR_MODEL_ID",
  "messages": [
    {
      "role": "user",
      "content": "Hello from LLMFLUX"
    }
  ],
  "stream": true
}'

Handle errors during iteration as well as when starting the request. See Streaming for event schemas and usage limitations.

Inspect errors and usage

SDK errors expose HTTP status and the response body. Use gateway error codes to distinguish invalid keys, exhausted credit and retryable failures. SDKs may retry automatically: configure bounded retries and remember inference has no gateway idempotency guarantee.

curl https://api.llmflux.dev/v1/usage \
  -H "Authorization: Bearer $LLMFLUX_API_KEY"

Usage and remaining credits are account-wide, even when queried with one key.