Get your 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.
apiKeyAuthorizationBearer <token>An API key from your organization's API keys page on the platform, nk_…. Server only.
Successful Response
application/json- 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*integerCredits added to your account beyond each day's, which last until spent and are used once today's are. 0 when there are none.
0available_credits*integerWhat your API keys can spend now: today's credits left plus your credit balance. A conversation starts while this is above zero.
0active_sessions*integerConversations 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}End a conversation POST
Ends one of your organization's conversations the way it ends when the person hangs up, though for now the page's `session.closed` may name the reason `error` rather than `close_requested`. One that hasn't started ends at once; a running one ends within a few seconds, once the AI persona leaves, and its place counts until then. Answers with the conversation as it stands, so a running one can still say `connected`. One already over is left as it is. It has no body; send `Content-Length: 0`. Reaches only your organization's conversations: another's answers 404.
Create a conversation POST
Creates a conversation with an unused session token, which spends it. The conversation runs with what the token was minted with.