跳到正文
Get Account Usage
cURL
curl -G https://openqiao.com/api/v1/management/usage \
  -H "Authorization: Bearer $OPENQIAO_MANAGEMENT_API_KEY" \
  --data-urlencode "type=usage" \
  --data-urlencode "query_dimension=BIZ_MTH" \
  --data-urlencode "query_time=202609" \
  --data-urlencode "api_key_ids=key_1,key_2" \
  --data-urlencode "model_slugs=openai/gpt-5" \
  --data-urlencode "bill_types=metered,subscription"
200
{
  "success": true,
  "data": {
    "tokensTotal": "1500000",
    "tokensPrompt": "1000000",
    "tokensCompletion": "500000",
    "requestCounts": "125",
    "tokensByModel": [
      {
        "bizTime": "20260903",
        "modelSlug": "openai/gpt-5",
        "tokenType": null,
        "apiKeyId": null,
        "tokens": "1500000",
        "requestCounts": "125"
      }
    ],
    "tokensByTokenType": [
      {
        "bizTime": "20260903",
        "modelSlug": null,
        "tokenType": "prompt",
        "apiKeyId": null,
        "tokens": "1000000",
        "requestCounts": null
      },
      {
        "bizTime": "20260903",
        "modelSlug": null,
        "tokenType": "completion",
        "apiKeyId": null,
        "tokens": "500000",
        "requestCounts": null
      }
    ],
    "tokensByApiKey": [
      {
        "bizTime": "20260903",
        "modelSlug": null,
        "tokenType": null,
        "apiKeyId": "key_1",
        "tokens": "1000000",
        "requestCounts": "80"
      },
      {
        "bizTime": "20260903",
        "modelSlug": null,
        "tokenType": null,
        "apiKeyId": "key_2",
        "tokens": "500000",
        "requestCounts": "45"
      }
    ],
    "countsByWebSearch": [
      {
        "bizTime": "20260903",
        "modelSlug": "openai/gpt-5",
        "tokenType": null,
        "apiKeyId": null,
        "tokens": null,
        "requestCounts": "3"
      }
    ]
  }
}