API Key Authentication
All API requests require an API key in the Authorization header.
Getting Your API Key
- Visit chat402.xyz
- Connect your wallet
- Go to API Keys page
- Click “Create New API Key”
- Copy and save the key (starts with
pp_)
Using Your API Key
Include the API key in the Authorization header:
Authorization: Bearer pp_1234567890abcdef...
Example Request
curl -X POST https://api.chat402.xyz/api/v1/prompt \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-3.5-turbo","prompt":"Hello!"}'
Keep your API key secret! Anyone with your key can use your balance.