BYOK (Bring Your Own Key)¶
Use your own provider API keys with IndoxHub. When BYOK is enabled, requests are billed directly to your provider account instead of using IndoxHub credits.
How It Works¶
- Pass your provider API key in the
byok_api_keyfield - IndoxHub routes the request using your key
- No IndoxHub credits are deducted
- Usage is still logged for your analytics
Usage¶
Add byok_api_key to any request:
import requests
response = requests.post(
"https://api.indoxhub.com/api/v1/chat/completions",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"model": "openai/gpt-4o-mini",
"messages": [{"role": "user", "content": "Hello!"}],
"byok_api_key": "sk-your-openai-key-here"
}
)
print(response.json()["data"])
Supported Endpoints¶
BYOK is supported on all generation endpoints:
- Chat Completions
- Text Completions
- Embeddings
- Image Generation
- Video Generation
- Text-to-Speech
- Speech-to-Text
BYOK-Enabled Models¶
Check the byok field in the Models endpoint to see which models support BYOK:
Security
Your BYOK API keys are used for the single request and are never stored by IndoxHub.