Quick Start
This guide helps you make your first successful request with VLX FLUX. It is written for customers who purchase distributed API access and want to use VLX FLUX in code, CLI tools, or OpenAI-compatible clients.
What You Need
Before starting, make sure you have:
- A VLX FLUX account
- An active API key
- Available balance or trial credit
- A model that your account can access
The Base URL is:
https://api.vlxflux.io/v1Step 1: Create an API Key
Sign in to the VLX FLUX dashboard and create an API key.
Keep the key private. Anyone with this key can send requests that may consume your account balance.
If you already have a key, you can continue with the next step.
Step 2: Check the Base URL
Use this Base URL in SDKs, CLI tools, and third-party clients:
https://api.vlxflux.io/v1Common mistakes:
- Do not write
https://api.vlxflux.ioif the client expects the/v1suffix. - Do not duplicate the version path, such as
/v1/v1. - Do not use the dashboard website URL as the API URL.
Step 3: Query Available Models
Use the model list endpoint to confirm which models your key can access:
curl https://api.vlxflux.io/v1/models \
-H "Authorization: Bearer YOUR_API_KEY"Replace YOUR_API_KEY with your own key.
If the request succeeds, you will receive a list of model IDs. Use one of these IDs in later requests.
Step 4: Send Your First Chat Request
Use a model available to your account:
curl https://api.vlxflux.io/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gpt-4o",
"messages": [
{ "role": "user", "content": "Say hello in one sentence." }
]
}'If the request returns a normal assistant message, your API key, Base URL, model name, and account balance are working.
Step 5: Use an SDK
For Python:
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.vlxflux.io/v1"
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[
{"role": "user", "content": "Say hello in one sentence."}
]
)
print(response.choices[0].message.content)For Node.js:
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.VLXFLUX_API_KEY,
baseURL: "https://api.vlxflux.io/v1",
});
const response = await client.chat.completions.create({
model: "gpt-4o",
messages: [
{ role: "user", content: "Say hello in one sentence." },
],
});
console.log(response.choices[0].message.content);Step 6: Configure a Third-Party Client
For OpenAI-compatible clients, fill in:
| Field | Value |
|---|---|
| API Key | Your VLX FLUX API key |
| Base URL | https://api.vlxflux.io/v1 |
| Model | A model available to your account |
Some clients use different labels, such as OpenAI Compatible API, Custom API Endpoint, API Host, or Base URL. These usually refer to the same setting.
Step 7: Check Billing
Each successful request may consume balance based on:
- The selected model
- Input and output token usage
- The model group multiplier
- Current pricing shown in the dashboard
You can review balance, usage history, and model pricing in the dashboard.
Quick Troubleshooting
| Symptom | What to check |
|---|---|
401 Unauthorized | API key is missing, incorrect, disabled, or has extra spaces |
403 Forbidden | The key does not have permission for the selected model or group |
404 Not Found | Base URL or request path is incorrect |
429 Too Many Requests | Request frequency or concurrency is too high |
model not found | Model name is wrong or unavailable to your account |
| Insufficient balance | Recharge or switch to a lower-cost model |