Docs Home

API

The Bonsai API v1 manages your account's clusters from code: create, rename and delete them, change their plans, manage their credentials, and read their usage, metrics and top search queries. Start with the overview, go straight to the quickstart, or look up an operation in the API reference.

The legacy API, at https://api.bonsai.io without a version in the path, keeps working for the clients that use it, but gets no new features.

API Reference

6 articles

Legacy API

15 articles

Overview

The Bonsai API v1 manages your account's clusters from code. With it you can: Create, rename and delete clusters, and change their plans. C...

Quickstart

This walks through the life of a cluster with the Bonsai API v1: pick a plan and a region, create the cluster, wait for it, connect to it, a...

Authentication

Every request to the Bonsai API v1 needs an API token, sent as a Bearer token in the Authorization header: curl https://api.bonsai.io/v1/acc...

Requests and responses

The conventions every operation of the Bonsai API v1 follows: bodies, times, IDs, pagination, and values that can grow. Bodies Request and r...

Actions

Some changes to a cluster take longer than a request should wait. In the Bonsai API v1, these run as Actions: the request starts the work an...

Retrying safely

A network error can leave you not knowing whether a request went through. Send an Idempotency-Key header with a write, and you can retry it ...

Rate limits

Each token can make 60 requests a minute, across all endpoints of the Bonsai API v1 and the legacy API together. Creating clusters is furthe...

Errors

Every error from the Bonsai API v1 is an RFC 9457 problem, with the content type application/problem+json: { "type": "https...

Versioning

The version is in the path: https://api.bonsai.io/v1. Within v1, changes are only additive. What can change within v1 We can, without notice...

Moving from the Legacy API

The legacy API keeps working, so nothing has to move. If you'd like what v1 adds, such as Actions you can follow, safe retries, error codes,...

Ready to power your search with AI?

Launch a fully managed Elasticsearch or OpenSearch cluster, with built-in vector search and AI capabilities.

Create an AI Ready Search Cluster
Calming Bonsai waves