Provider
Upstream API provider management.
Endpoints
GET https://ai-tokenhub.com/v1/admin/providers
POST https://ai-tokenhub.com/v1/admin/providers
PUT https://ai-tokenhub.com/v1/admin/providers/{id}
DELETE https://ai-tokenhub.com/v1/admin/providers/{id}Provider Object
json
{
"id": "provider_openai",
"name": "OpenAI",
"type": "openai",
"status": "active",
"endpoint": "https://api.openai.com/v1",
"quota_limit": 1000000,
"quota_used": 500000,
"models": ["gpt-4o", "gpt-4o-mini"]
}Create Provider
bash
curl -X POST https://ai-tokenhub.com/v1/admin/providers \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "New Provider",
"type": "openai",
"endpoint": "https://api.openai.com/v1",
"models": ["gpt-4o"]
}'Provider Types
| Type | Description |
|---|---|
| openai | OpenAI compatible API |
| anthropic | Anthropic API |
| Google AI API | |
| azure | Azure OpenAI |
| custom | Custom provider |
Fields
| Field | Type | Description |
|---|---|---|
| id | string | Provider ID |
| name | string | Provider name |
| type | string | Provider type |
| status | string | Status |
| endpoint | string | API endpoint |
| quota_limit | integer | Quota limit |
| models | array | Supported models |