---
title: "REST API - Reference | SnowAI"
description: "The SnowAI REST API: base URL, authentication, every endpoint, response headers, idempotency and rate limits."
url: "https://trysnow.ai/docs/reference/rest"
---

# REST API

> Every tool is a POST at the API root, and the wallet, usage and keys have their own endpoints. There is no version prefix.

## Basics

- **Base URL**: `https://api.trysnow.ai`
- **Authentication**: `Authorization: Bearer <API key or OAuth access token>`
- **Format**: JSON in, JSON out. Errors are `application/problem+json`.
- **OpenAPI**: `https://api.trysnow.ai/openapi.json`

**Your wallet**

```sh
curl https://api.trysnow.ai/wallet \
  -H "Authorization: Bearer $SNOWAI_API_KEY"
```

[REST and API keys](https://trysnow.ai/docs/clients/rest) shows how to make a key.

## Endpoints

Signed-in owner means your dashboard session. An API key or an OAuth token cannot change money settings or keys.

| Endpoint | Who | What it does |
| --- | --- | --- |
| `GET /tools` | Anyone | The catalog: every tool with its toolset, price, cache time, deadline and input schema. |
| `POST /tools/<name>` | Key or token | Runs a tool. The arguments are the JSON body. |
| `GET /me` | Key or token | Who is calling, the organization and the wallet. |
| `GET /wallet` | Key or token | Balance, holds, free and plan credits, the plan, this month's spend and the caps. |
| `PATCH /wallet` | Signed-in admin | Sets `spend_cap_credits` and `approval_threshold_credits`. |
| `GET /wallet/entries` | Signed-in admin | The wallet's journal, newest first. Takes `limit`, `type`, and `page` (the answer then has `total`) or `before`. |
| `POST /wallet/topups` | Signed-in admin | Starts a Stripe Checkout for `credits` and answers its `url`, for a person to pay. A key or token with no person behind it is refused. |
| `POST /wallet/plan` | Signed-in admin | Starts the monthly plan at `credits`, one of the plan sizes, and answers a Stripe Checkout `url`. With a plan already, a bigger size takes effect now and a smaller one at the next renewal; `status` says which. |
| `DELETE /wallet/plan` | Signed-in admin | Cancels the plan at the end of the month already paid for. |
| `POST /wallet/billing-portal` | Signed-in admin | Answers the `url` of Stripe's page for the card, invoices and tax details. |
| `GET /brands` | Key or token | The organization's brands, each with its domain, market, language, profile and Google Search Console and Analytics properties, and which one tools use by default. |
| `POST /brands` | Signed-in admin | Adds a brand from its `website`, with an optional `name`. |
| `PATCH /brands/{id}` | Signed-in admin | Changes a brand's `name`, `country`, `language` or `profile`: description, sector, audience, aliases, competitors, guidelines, tone, `cta` and `images`. Profile fields left out keep their value; an empty string or list clears one. |
| `GET /brands/{id}/memory` | Signed-in person | The brand's memory documents with their status, and the organization's memory storage. |
| `POST /brands/{id}/memory/text`, `/url` and `/file` | Signed-in admin | Adds a note (`name`, `text`), a page (`url`) or a file (`filename`, base64 `data`, up to 20 MB) to the brand's memory. |
| `DELETE /brands/{id}/memory/{doc}` | Signed-in admin | Deletes a document from the brand's memory. |
| `DELETE /brands/{id}` | Signed-in admin | Deletes a brand with its Google connection and memory. Its articles stay. |
| `GET /usage` | Key or token | Calls and spend per day, status and tool. Takes `days`, 1 to 366, or `from` and `to` as YYYY-MM-DD. |
| `GET /calls` | Key or token | Calls with what each cost. Takes `limit`, `page` (the answer then has `total`) or `before`, `sort` (`when` or `cost`), `dir`, `tool`, `status`, `from`, `to` and `all`. |
| `GET /api-keys` | Signed-in person | The organization's API keys with this month's calls and spend. |
| `POST /api-keys` | Signed-in admin | Creates a key from `name` and an optional `cap_credits`. The key is in the answer once. |
| `DELETE /api-keys/<id>` | Signed-in admin | Revokes a key. |
| `GET /oauth-apps` | Signed-in person | The apps you connected. |
| `DELETE /oauth-apps/<clientId>` | Signed-in person | Disconnects an app: its refresh tokens stop working. |
| `GET /workspace/toolsets` | Key or token | The toolsets agents may run, every toolset, and the MCP URL. |
| `PUT /workspace/toolsets` | Signed-in admin | Chooses the toolsets agents may run. `null` allows every toolset. |
| `GET /workspaces` | Signed-in person | Your organizations, your role in each, and which is open. |
| `POST /workspaces/active` | Signed-in person | Opens the organization in `workspace_id` for this session. |
| `PATCH /workspace` | Signed-in admin | Renames the open organization from `name`. |
| `GET /team` | Signed-in person | The members and pending invitations. |
| `POST /team/invitations` | Signed-in admin | Invites `email` as `admin` or `member`. The link works for 7 days. |
| `DELETE /team/invitations/<id>` | Signed-in admin | Cancels an invitation. |
| `PATCH /team/members/<id>` | Signed-in admin | Changes a member's `role`. |
| `DELETE /team/members/<id>` | Signed-in admin, or yourself | Removes a member, or leaves. Their API keys stop working. |
| `POST /invitations/<id>/accept` | Signed-in person | Joins the organization. `/decline` turns it down. |
| `GET /articles` | Key or token | Articles written for this organization, newest first. |
| `GET /articles/<id>` | Key or token | One article: its progress while writing, its Markdown once done. |
| `GET /openapi.json` | Anyone | The OpenAPI 3.1 document for all of the above. |

## Tools

`GET /tools` answers `usd_per_credit`, `families`, `toolsets` and `tools`. Each tool has `name`, `toolset`, `source`, `title`, `description`, `example`, `price`, `cache_ttl_seconds`, `deadline_seconds`, `annotations` and `input_schema`.

`POST /tools/<name>` answers 200 with the tool's fields and the billing fields, or 202 while the source is still working. Anything else is a problem object. A streamed call (`Accept: text/event-stream` or `application/x-ndjson`) always answers 200: a failure, a 402 included, arrives as its last `error` event. [Tools](https://trysnow.ai/docs/tools) has the shape, and each toolset page has a call to copy.

## Headers

| Header | Direction | Meaning |
| --- | --- | --- |
| `Authorization` | Request | `Bearer` and an API key or an OAuth access token. |
| `Idempotency-Key` | Request | Eight to 128 characters. A retry returns the first answer instead of charging twice. |
| `Accept` | Request | `text/event-stream` or `application/x-ndjson` streams progress from tools that wait. |
| `Snow-Call-Id` | Response | The call's id. |
| `Snow-Cost-Credits`, `Snow-Cost-USD` | Response | What the call cost. |
| `Snow-Balance-Credits` | Response | What the wallet holds afterwards. |
| `Snow-Cached` | Response | `true` when the answer came from the cache. |
| `WWW-Authenticate` | Response | On 401: `Bearer` and the URL of the protected resource metadata. |
| `Retry-After` | Response | On 429: seconds to wait. |

## Limits

240 requests and 120 tool calls a minute per organization, across REST and MCP, with 10 calls running at once. Past a limit the answer is 429 `rate-limited`. The API answers browsers only from the SnowAI site, so call it from a server. [Errors and limits](https://trysnow.ai/docs/billing/errors) has the rest.

Every docs page as Markdown: https://trysnow.ai/llms.txt
