{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/UsageMetadata",
"title": "UsageMetadata",
"type": "object",
"description": "Metadata on the generation request's token usage.",
"properties": {
"promptTokenCount": {
"type": "integer",
"format": "int32",
"description": "Number of tokens in the prompt."
},
"candidatesTokenCount": {
"type": "integer",
"format": "int32",
"description": "Total number of tokens across all the generated response candidates."
},
"totalTokenCount": {
"type": "integer",
"format": "int32",
"description": "Total token count for the generation request (prompt + response candidates)."
},
"cachedContentTokenCount": {
"type": "integer",
"format": "int32",
"description": "Number of tokens in the cached part of the prompt (the cached content)."
}
}
}
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.