SDKs

Official clients for TypeScript and JavaScript, Python and PHP. Each has one method for every public operation (133 today), and all are generated from the same OpenAPI contract as the reference.

Language Needs Version 0.1.0 Get started
TypeScript and JavaScript Node.js 18 or later Download Quickstart
Python Python 3.8 or later Download Quickstart
PHP PHP 8.0 or later with curl and json Download Quickstart

Install from here for now. The clients are not on npm, PyPI or Packagist yet. Each quickstart shows the command that installs the download.

Tutorials: Next.js · Flutter

What you get

  • No dependencies. Nothing else to install or keep up to date.
  • Retries. 429 and 5xx answers are retried twice by default, honouring Retry-After. quota_exhausted is not retried, because retrying soon will not help.
  • One error type. Every failure carries code, the request_id, every problem with the request in issues, the choices for an ambiguous place in candidates, and likely paths in suggestions. See errors.
  • Charts and PDFs. SVG operations return text, and PNG and PDF operations return the file's content.
  • Types. The TypeScript client declares each operation's arguments and states its credits.
  • MIT licence. Use them in closed-source and commercial work.

How we test them

Our test suite runs each client in its own language against the API's real request chain: a chart, an SVG and a PNG, a typed error, a missing parameter and a retry. It also runs the code in each quickstart as printed, from the files you download. These runs use our test setup, not your account.

Keep your key on a server

A client holds a secret key, so it belongs on your server, never in a web page or a mobile app. For the browser, use widgets with a publishable key.

You don't need one

The API is JSON over HTTPS with one Bearer key. Any language can call it directly: see the quickstart for curl, or generate your own client from openapi.yaml.

Building with an AI assistant? See the MCP servers.