Sign in
Docs

API reference

Get narration usage

Have a token? Manage tokens in the console
GET
/v1/narration/usage

This month's characters as InOrbit counts them and as ElevenLabs counts them (cached a day, plus what was spent since; refresh asks the provider again), the cap that applies and the plan.

Needs scope narration:read.

Authorization

bearer
headerAuthorizationBearer <token>

An access token from the identity provider: a person's, or a customer's from the client credentials grant with an API key (developers.inorbit.hr). The gateway verifies it; the audience is iohr-api.

Query Parameters

refresh?boolean

Ask ElevenLabs again instead of answering the cache.

Response Body

iohr.narration.v1.GetUsageResponse

application/json
  1. response

iohr.narration.v1.GetUsageResponse

characters_cached*integer
Formatint32
characters_spent*integer
Formatint32
effective_monthly_characters*integer
Formatint32
lines_spoken*integer
Formatint32
month*string
plan*string
provider?

iohr.narration.v1.ProviderUsage

provider_note*string
import { ApiError, Public } from "@inorbithr/sdk";// Reads INORBIT_TOKEN, or INORBIT_KEY_ID and INORBIT_KEY_SECRET.const api = Public.fromEnv();try {  const { value } = await api.narration.getUsage();  console.log(value);} catch (e) {  if (!(e instanceof ApiError)) throw e;  console.error(`${e.code}: ${e.problem} (request id ${e.raw.requestId})`);}

npm install @inorbithr/sdk. Calls the package's public surface; an operation newer than your package needs the next release or a client generated for your account. The SDKs.

{  "characters_cached": 0,  "characters_spent": 0,  "effective_monthly_characters": 0,  "lines_spoken": 0,  "month": "string",  "plan": "string",  "provider": {    "characters_limit": "string",    "characters_used": "string",    "fetched_at": "string",    "plan": "string",    "provider": "string",    "resets_at": "string",    "status": "string"  },  "provider_note": "string"}