Skip to content
Request
Response

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

TypeDescription
openaiOpenAI compatible API
anthropicAnthropic API
googleGoogle AI API
azureAzure OpenAI
customCustom provider

Fields

FieldTypeDescription
idstringProvider ID
namestringProvider name
typestringProvider type
statusstringStatus
endpointstringAPI endpoint
quota_limitintegerQuota limit
modelsarraySupported models