API referenceCount tokens (Gemini)Copy pageCount tokens (Gemini) POST/gemini/v1beta/models/{model_id}:countTokens Estimate the input tokens of a request. Send the contents alone or a whole generateContent request. Divyam may route a request to any model, so the count is an estimate. Request Response codes200Successful ResponseOpen in the Divyam consoleGetting startedCreate a key and make a first requestAPI keysCreate, rotate or revoke credentials