# API

> The basics every call shares. Where the API lives, how it answers, and the guides for each part.

On the web: https://www.aeyho.com/docs/api

## The basics

- **Base URL:** `https://www.aeyho.com/api/v1`
- **Auth:** every call sends `Authorization: Bearer <key>`. See [authentication and keys](/docs/api/authentication-and-keys).
- **Bodies:** JSON in and JSON out. Send `Content-Type: application/json` with a body.
- **Errors:** `application/problem+json`, with a `code` you can switch on. See [errors](/docs/api/errors).
- **Long work runs on its own.** Making a reel, a change or a fix answers `202` at once. Poll the object, or listen for [webhooks](/docs/api/webhooks).
- **Credits.** Calls that make something use credits from your balance. Costs aren't shown per call. `GET /account` shows the balance.
- **Versions.** The version in the path is the major one. Within v1, changes only add things. See the [changelog](/changelog/api).
- **Browsers** can call the API too (CORS is open), but never put a live key in a public page.

## What you can do

| Part | What it's for |
|---|---|
| Account | Your plan and credit balance. |
| Brands | The businesses or creators you make content for. Make one from a link. |
| Taste | What a brand likes, kept as short rules every writer follows. |
| Ideas | The brand's content plan. |
| Reels | Make a reel or carousel, read it, ask for a change in words. |
| Versions | Every version of a reel. Restore or approve one. |
| Comments | Pin a comment to a moment or a slide, then fix just those parts. |
| Reel Score | A free craft check of any reel from its link. |
| Webhooks | Events sent to your server. |

The [API reference](/docs/api/reference) lists every route.

## Try it

```bash
curl https://www.aeyho.com/api/v1/brands \
  -H "Authorization: Bearer $AEYHO_KEY"
```
