Key, credits & generations
GET /key returns the calling key's limits and spend; GET /credits the balance; GET /generation?id= the tokens (including cached and reasoning), cost, time to first token and latency of any request.
# The calling key: rate limits, this month's spend
curl https://api.ultragpt.pro/v1/key -H "Authorization: Bearer $ULTRAGPT_API_KEY"
# Credit balance (shared with the UltraGPT app)
curl https://api.ultragpt.pro/v1/credits -H "Authorization: Bearer $ULTRAGPT_API_KEY"
# Tokens, cost and latency of one request, by its response id
curl "https://api.ultragpt.pro/v1/generation?id=chatcmpl-..." -H "Authorization: Bearer $ULTRAGPT_API_KEY"