Skip to content

Query: Token Quota

Short description: Query the authorized token quota for the current API key.


Overview

  • Method: GET
  • Path: /v1/dashboard/billing/subscription
  • Content-Type: application/json

Authentication

  • Header: Authorization: Bearer <token>

Request Example

curl Example

bash
curl -X GET "https://api.gpt.ge/v1/dashboard/billing/subscription" \
  -H "Authorization: Bearer sk-xxxx"

JavaScript (fetch) Example

javascript
fetch('https://api.gpt.ge/v1/dashboard/billing/subscription', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer sk-xxxx'
  }
}).then(r => r.json()).then(console.log);

Python (requests) Example

python
import requests

url = 'https://api.gpt.ge/v1/dashboard/billing/subscription'
headers = {
    'Authorization': 'Bearer sk-xxxx'
}

response = requests.get(url, headers=headers)
print(response.json())

Response Example (200)

json
{
  "object": "billing_subscription",
  "has_payment_method": true,
  "soft_limit_usd": 5,
  "hard_limit_usd": 5,
  "system_hard_limit_usd": 5,
  "access_until": 0
}

Note: If the token is set to unlimited quota, the returned quota may be 100000000. Quota adjustments are cumulative on top of the previous authorized limit.