Skip to main content

Quickstart Guide

Get up and running with TokenFlux in just a few minutes. This guide will help you make your first API call and understand the basics of our platform.
TokenFlux is fully compatible with OpenAI’s client libraries. If you have existing OpenAI code, you can switch to TokenFlux by simply changing the base URL and API key.

Prerequisites

Before you begin, you’ll need:
  • A TokenFlux account (sign up free)
  • Credits in your account (purchase after signing up)
  • Your API key from the dashboard

Installation

TokenFlux works with any OpenAI-compatible client library. Choose your preferred language:

Your First API Call

Here’s how to make your first chat completion request:
Replace YOUR_TOKENFLUX_API_KEY with your actual API key from the dashboard. You can find it under Settings → API Keys.

Try Different Models

TokenFlux provides access to 200+ models from leading providers. Simply change the model parameter:
Use the Models API to discover all available models with their pricing and capabilities.

Streaming Responses

For a better user experience with long responses, enable streaming:

Generate Embeddings

Create vector embeddings for semantic search and RAG applications:

Create Images

Generate images from text descriptions:

What’s Next?

Now that you’ve made your first API calls, explore these resources:

Introduction

Learn about TokenFlux features and capabilities

Chat Completions

Master conversational AI with advanced features

Embeddings

Build semantic search and RAG applications

Image Generation

Create stunning AI-generated images
Remember to keep your API key secure and never commit it to version control. Use environment variables or secure key management services in production.