> ## Documentation Index
> Fetch the complete documentation index at: https://crevio.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# API overview

> The Crevio REST API at a glance — base URL, bearer authentication, the primitives you can build on, and where to go next.

**Crevio exposes its entire AI-native platform as a REST API at `https://api.crevio.co/v1`.** Use it to build custom websites, sync data with other systems, generate content, and run autonomous AI work.

This page is the hub. For the rules every endpoint follows see [Conventions](/developer/guides/conventions); for failure handling see [Errors](/developer/guides/errors); to get going fast see the [Quickstart](/developer/guides/quickstart).

## Authentication

Every request is authenticated with a **bearer token** sent in the `Authorization` header.

```bash theme={null}
curl https://api.crevio.co/v1/products \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

Create tokens in your dashboard under **Settings → Developer**. A token is shown once — store it in an environment variable or secrets manager, never in client-side code. Requests without a valid token get a `401`. See the [Quickstart](/developer/guides/quickstart) for the full setup.

## Base URL

```
https://api.crevio.co/v1
```

## What you can build on

Crevio's primitives span the whole business, not just commerce. Operations marked **metered** consume credits (see [Usage & billing](/developer/guides/usage-billing)).

| Primitive                  | What it does                                       | Metered     |
| -------------------------- | -------------------------------------------------- | ----------- |
| Products & price variants  | Sellable products and their pricing/billing models | —           |
| Checkouts & checkout links | Create payment sessions; shareable buy links       | —           |
| Orders, invoices, refunds  | The money lifecycle                                | —           |
| Customers & subscriptions  | Buyers, leads, and recurring billing               | —           |
| Discounts & reviews        | Promo codes and social proof                       | —           |
| Experiences                | Course/content delivery (read-only)                | —           |
| Files & media generation   | Uploads + AI images, video, audio                  | media gen   |
| Sites & domains            | AI website builder, domain purchase/connect        | site builds |
| Email & socials            | Broadcast email and multi-platform social posts    | —           |
| Web tools                  | Research, crawl, map, read, extract, search        | yes         |
| Tasks & task runs          | Your scheduled AI workforce                        | yes         |
| Calls & phone numbers      | Autonomous AI phone calls                          | yes         |
| Webhooks & events          | React to platform events in real time              | —           |
| Usage                      | Plan, credit balance, and spend                    | —           |

<Note>
  Almost every operation here is also available to AI agents over [MCP](/developer/mcp) — you can script it, or just ask the agent to do it.
</Note>

## Core conventions, in brief

* **Unwrapped params** — fields go at the top level, not under a resource key.
* **Associations** — bare name + prefixed id (`product: "prod_abc123"`, not `product_id`).
* **Money** — integer cents, lowercase currency (`amount: 4900`, `currency: "usd"`).
* **Lists** — return `{ object: "list", data: [...], has_more }`; single resources return the object directly.
* **IDs** — prefixed strings (`prod_`, `cus_`, `price_`, `ord_`…) that encode the type.

The full rules — pagination, slug lookup, expand, delete responses, and the complete ID-prefix table — live in [Conventions](/developer/guides/conventions).

## Errors

Failures return a JSON envelope you can branch on:

```json theme={null}
{
  "error": {
    "type": "validation_error",
    "code": "validation_failed",
    "message": "Email can't be blank",
    "errors": { "email": ["can't be blank"] }
  }
}
```

See [Errors](/developer/guides/errors) for every status code and how to debug each.

## Rate limiting

Crevio allows **600 requests per 60-second window** per credential. Every response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset`; exceeding the limit returns `429` with code `rate_limit_exceeded`. Back off and retry using the `X-RateLimit-Reset` timing. See [Rate limits](/developer/guides/rate-limits) for the full details.

<Tip>
  The [`@crevio/sdk`](/developer/guides/sdk) handles retries and backoff automatically.
</Tip>

## TypeScript SDK

The official [`@crevio/sdk`](/developer/guides/sdk) wraps the API with types, Zod validation, retries, and multi-runtime support (Node.js, browsers, Cloudflare Workers, Deno, Bun).

<CodeGroup>
  ```bash npm theme={null}
  npm install @crevio/sdk
  ```

  ```bash bun theme={null}
  bun add @crevio/sdk
  ```

  ```bash pnpm theme={null}
  pnpm add @crevio/sdk
  ```

  ```bash yarn theme={null}
  yarn add @crevio/sdk
  ```
</CodeGroup>

```typescript theme={null}
import { Crevio } from "@crevio/sdk";

const crevio = new Crevio({ apiKeyAuth: "YOUR_API_TOKEN" });

const products = await crevio.products.list();
const product = await crevio.products.get({ id: "prod_abc123" });

const checkout = await crevio.checkouts.create({
  email: "customer@example.com",
  lineItems: [{ priceVariant: "price_xyz789", quantity: 1 }],
});
```

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/developer/guides/quickstart">
    Key to first call in under five minutes.
  </Card>

  <Card title="Conventions" icon="list-check" href="/developer/guides/conventions">
    The rules every endpoint follows.
  </Card>

  <Card title="Errors" icon="triangle-exclamation" href="/developer/guides/errors">
    Decode and fix every status code.
  </Card>

  <Card title="Usage & billing" icon="credit-card" href="/developer/guides/usage-billing">
    How metered pay-per-call credits work.
  </Card>
</CardGroup>
