Quick Start
Get started with Chat2API in minutes - add your first provider and make an API call
Step 1: Launch the App
After installation, launch Chat2API. You'll see the main dashboard.
Step 2: Add a Provider
- Navigate to Providers from the sidebar
- Click Add Provider button
- Select a built-in provider (e.g., DeepSeek)
- Enter your authentication credentials
Getting Your Token
Each provider requires different authentication. See the Providers section for detailed instructions on obtaining tokens for each service.
For example, to get a DeepSeek token:
- Visit DeepSeek Chat
- Start any conversation
- Press
F12to open Developer Tools - Go to Application > Local Storage
- Find
userTokenand copy its value
Step 3: Configure Proxy
- Navigate to Proxy Settings from the sidebar
- Set the port (default: 8080)
- Choose a load balancing strategy:
- Round Robin: Distributes requests evenly across accounts
- Fill First: Uses one account until limit is reached
- Failover: Automatically switches on failure
- Click Start Proxy
Step 4: Test the API
Using curl
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "DeepSeek-V3.2",
"messages": [
{"role": "user", "content": "Hello, who are you?"}
],
"stream": false
}'Using Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
api_key="your-api-key",
base_url="http://localhost:8080/v1"
)
response = client.chat.completions.create(
model="DeepSeek-V3.2",
messages=[
{"role": "user", "content": "Hello, who are you?"}
]
)
print(response.choices[0].message.content)Using JavaScript/TypeScript
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'your-api-key',
baseURL: 'http://localhost:8080/v1',
});
const response = await client.chat.completions.create({
model: 'DeepSeek-V3.2',
messages: [{ role: 'user', content: 'Hello, who are you?' }],
});
console.log(response.choices[0].message.content);Step 5: Manage API Keys (Optional)
For security, you can enable API Key authentication:
- Go to API Keys page
- Click New API Key
- Enter a name and description
- Copy the generated key
Keep your API Key secure. You can always view created keys in the API Keys page.