Create an ApiFlux API key
Sign in to ApiFlux, create and store an API key, confirm the Base URL, and verify your first request.
This guide takes you through signing in to ApiFlux, creating an API key, confirming the Base URL, and verifying that a configured tool is sending requests through ApiFlux.
Before you start
Make sure you have an ApiFlux account and can sign in to the console.
If you need to connect Codex CLI, Claude Code or OpenCode later, we recommend that you read first:
Prepare your terminal and development environment
ApiFlux website:
https://apiflux.ai/ApiFlux API Base URL:
https://apiflux.ai/v1[!IMPORTANT] An API key grants access to your account's API usage. Never expose a complete key in screenshots, public documents, GitHub repositories, chats, or videos.
1. Log in to the ApiFlux console
Open a browser and visit:
https://apiflux.ai/Click Sign In in the upper-right corner. After signing in, open the ApiFlux console.
[!NOTE] Use the website to sign in and manage your account. Use the API Base URL to configure development tools and SDKs.
2. Enter Dashboard
After signing in, the console opens the Dashboard. It displays your balance, request count, recent usage, and access information.
In the Access information area of the Dashboard, you can see the Base URL:
https://apiflux.ai/v1Use this address when configuring Codex CLI, Claude Code, OpenCode, or an OpenAI-compatible SDK.
3. Create API key
Click Create key on the Dashboard page.
You can also open API keys from the left navigation and click the create button.
Give the API key a name that identifies its purpose, for example:
codex-cli
claude-code
opencode
production-app
local-testOne key is enough for a quick test. For regular use, create separate keys for each tool or environment so you can trace usage and revoke access independently.
4. Copy and save API key
Copy the API key immediately and store it in a secure location.
We recommend that you record the following information:
Name: codex-cli
API key: YOUR_APIFLUX_API_KEY
Base URL: https://apiflux.ai/v1
Usage: Codex CLI[!WARNING] The complete API key is usually shown only once. If you close the page without saving it, delete that key and create another one.
5. View API keys list
Open API keys in the left navigation to view your keys.
Common management operations include:
- Create a new API key
- Delete keys that are no longer used
- Use descriptive names to distinguish tools and environments
- Revoke a key immediately if it is exposed
6. Use Logs to verify the request
After configuring a tool or SDK, open Logs in the left navigation.
Logs can be used to confirm:
- Whether the request reached ApiFlux
- Which model handled it
- Whether it succeeded
- Why it failed
- How many tokens and credits it consumed
If the tool returns a response but no entry appears in Logs, check that the tool is using the ApiFlux Base URL and API key.
Common mistakes
Treat the website address as the API Base URL
The website is:
https://apiflux.ai/The API Base URL is:
https://apiflux.ai/v1Most OpenAI-compatible tools should use the API Base URL.
Including Bearer in the API key field
Most tools expect only the raw key:
YOUR_APIFLUX_API_KEYDon't write:
Bearer YOUR_APIFLUX_API_KEYOnly include Bearer when the tool explicitly asks for a complete Authorization header.
API key leaked
If an API key is exposed, delete it in the ApiFlux console immediately and create a replacement.