Nuance LabsDocs
ReferenceAPI overviewServer

Get your usage

GET
/usage

Your organization's limits, today's credits, your credit balance and what is available in all, and how many conversations its API keys hold active now, ones still starting included. Check it before starting a conversation to avoid a 409 or 429.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from your organization's API keys page on the platform, nk_…. Server only.

Response Body

Successful Response

application/json
  1. response

What your organization's API keys may use, and have used today.

limits*

Your organization's limits.

credits*

Today's credits (UTC).

credit_balance*integer

Credits added to your account beyond each day's, which last until spent and are used once today's are. 0 when there are none.

Default0
available_credits*integer

What your API keys can spend now: today's credits left plus your credit balance. A conversation starts while this is above zero.

Default0
active_sessions*integer

Conversations your API keys hold active now, ones still starting included. A new one answers 409 once this reaches limits.concurrent_sessions.

curl -X GET 'https://api.nuancelabs.ai/usage'
{  "limits": {    "concurrent_sessions": 0,    "daily_credits": 0,    "api_keys": 0,    "hourly_conversations": 0  },  "credits": {    "used": 0,    "remaining": 0,    "renews_at": "2019-08-24T14:15:22Z"  },  "credit_balance": 0,  "available_credits": 0,  "active_sessions": 0}