Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
2ceca9c
docs: brand and theme refresh
sidneyswift Apr 27, 2026
edc3932
docs: MCP tool catalog rewrite
sidneyswift Apr 27, 2026
da329ff
docs: content & OpenAPI cleanup
sidneyswift Apr 27, 2026
8de8e57
docs: agent-first onboarding overhaul
sidneyswift Apr 27, 2026
b7fdac6
docs(agents): use $RECOUP_API_KEY consistently in curl examples
sidneyswift Apr 27, 2026
8025291
docs(agents): replace <value> placeholder with copy-paste-safe form
sidneyswift Apr 28, 2026
a2c59bb
docs: introduce Skills system
sidneyswift Apr 27, 2026
a712a67
docs: navigation restructure
sidneyswift Apr 27, 2026
0d67a84
docs: fix favicon to use new brand icon
sidneyswift Apr 28, 2026
77925bf
docs(agents): add "Choose your path" decision tree + create-artist wa…
sidneyswift Apr 28, 2026
eace49d
docs(agents): instruct agents to ASK before choosing auth path
sidneyswift Apr 28, 2026
9459f9e
docs(agents): tighten the "ask first" instruction and question template
sidneyswift Apr 28, 2026
b333f32
docs: simplify entry-point pages — one job per page
sidneyswift Apr 28, 2026
b5350e6
docs: refresh brand assets — favicon, logos, fonts
sidneyswift May 5, 2026
ce0f927
Merge PR #168: docs: brand and theme refresh
sidneyswift May 5, 2026
5a71843
Merge PR #170: docs: MCP tool catalog rewrite
sidneyswift May 5, 2026
1a3448c
Merge PR #171: docs: content & OpenAPI cleanup
sidneyswift May 5, 2026
26899f3
Merge PR #172: docs: agent-first onboarding overhaul
sidneyswift May 5, 2026
739f28b
Merge PR #173: docs: introduce Skills system
sidneyswift May 5, 2026
356ad69
Merge PR #174: docs: navigation restructure
sidneyswift May 5, 2026
5ba1f8d
docs(nav): add Sessions and Models groups for recent main additions
sidneyswift May 6, 2026
318a555
docs(nav): drop stale Instagram nav entries deleted by main #163
sidneyswift May 6, 2026
848b665
docs(skills): add recoup-api, regroup, drop chart-metric
sidneyswift May 6, 2026
d69a567
docs(skills): collapse skills nav to Setup + Playbooks
sidneyswift May 6, 2026
1805359
docs(skills): document npx skills install path
sidneyswift May 6, 2026
3698394
docs(plugins): add Plugins tab with music-catalog-diligence
sidneyswift May 6, 2026
c7a7008
docs(skills): fix content-creation title casing
sidneyswift May 6, 2026
124e04d
docs(plugins): replace fake install copy with verified agent-actionab…
sidneyswift May 6, 2026
18ca247
docs(plugins): correct install paths — Cowork takes a GitHub URL, Cur…
sidneyswift May 6, 2026
77f404c
docs(plugins): update Cowork section with verified install path
sidneyswift May 6, 2026
e18cd36
docs(plugins): include 'Create plugin' submenu in cowork install row
sidneyswift May 6, 2026
dde5524
docs(openapi): drop refs to deleted Instagram endpoints in scraper de…
sidneyswift May 6, 2026
237b621
docs(credits): add credits reference page (cost-per-endpoint table)
sidneyswift May 6, 2026
56902ba
docs(skills): convert create-artist workflow into a skill
sidneyswift May 6, 2026
321cac6
chore: untrack superpowers/ workspace files swept in by mistake
sidneyswift May 6, 2026
908dd1d
docs(credits): slim to a high-level reference; remove specific cost n…
sidneyswift May 6, 2026
17bf22a
docs(credits): cut redundancy, expand subscription, note one-time top…
sidneyswift May 6, 2026
0d530af
docs(index): broaden positioning beyond record labels
sidneyswift May 6, 2026
1500c9f
docs(index): rewrite lead paragraph to add the workflows layer
sidneyswift May 6, 2026
8a02e77
docs(index): drop "the work is the same" — flattened real differences
sidneyswift May 6, 2026
98b5362
docs: move Core concepts table from homepage to authentication
sidneyswift May 6, 2026
1634ba6
docs: rebase Base URL on api.recoupable.com everywhere
sidneyswift May 6, 2026
f896bc7
docs: remove non-existent GET /api/comments endpoint
sidneyswift May 6, 2026
0cddd09
Merge remote-tracking branch 'origin/main' into docs/full-overhaul
sidneyswift May 6, 2026
84b7d79
docs: refresh stale claims on homepage + fix misleading MCP key framing
sidneyswift May 6, 2026
ff66c3b
docs: drop endpoint and tool counts from cards and descriptions
sidneyswift May 6, 2026
bf53edd
docs: also drop endpoint counts from quickstart and music-industry-re…
sidneyswift May 6, 2026
15ea5d3
docs(credits): cut the "source of truth" lead-in and the FAQ section
sidneyswift May 6, 2026
d2f9f93
docs: restore /workflows/create-artist for skill backward compat
sidneyswift May 6, 2026
8355862
docs: address code-review feedback — 7 fixes from PR #189 review
sidneyswift May 7, 2026
a0ce3c1
docs(openapi): revert fix #9 — text-only video IS supported, schema w…
sidneyswift May 7, 2026
9dd008a
docs(credits): restore Check your tier curl with the real endpoint
sidneyswift May 7, 2026
3af6c65
Merge origin/main into docs/full-overhaul
sidneyswift May 7, 2026
c9d66c4
Promote Workflows to a top-level tab
sidneyswift May 7, 2026
71a9950
Collapse Skills + Plugins into landing-only directories
sidneyswift May 7, 2026
3bf369c
Combine Skills + Plugins into one tab, drop playbook/recipe synonyms
sidneyswift May 7, 2026
2378941
Drop redundant single-page group wrappers in Skills & Plugins and Wor…
sidneyswift May 7, 2026
a2b6aca
Add per-item Skills & Plugins pages with human-readable titles
sidneyswift May 7, 2026
547623c
Fix skill definition: self-contained folder, not a single markdown file
sidneyswift May 7, 2026
20f73b1
Strip em-dashes across the docs
sidneyswift May 7, 2026
1910403
Force favicon to use the black-fill icon
sidneyswift May 7, 2026
d8c33d9
Merge origin/main into docs/full-overhaul
sidneyswift May 7, 2026
79b8810
Address PR feedback
sidneyswift May 7, 2026
29ac63b
Rename 'Create content' skill page to 'Make a video' (reviewer feedback)
sidneyswift May 7, 2026
b99c84e
Revert content-creation title to umbrella scope
sidneyswift May 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
superpowers/
199 changes: 138 additions & 61 deletions agents.mdx
Original file line number Diff line number Diff line change
@@ -1,96 +1,173 @@
---
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Custom agent: Enforce Clear Code Style and Maintainability Practices

agents.mdx exceeds the rule’s <100 line limit and combines multiple responsibilities into one page.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At agents.mdx, line 2:

<comment>`agents.mdx` exceeds the rule’s <100 line limit and combines multiple responsibilities into one page.</comment>

<file context>
@@ -1,96 +1,172 @@
 ---
-title: 'Agents'
-description: 'Programmatic agent onboarding — sign up and obtain API keys in one call, no dashboard, no human in the loop.'
+title: "Agent Onboarding"
+description: "The operating manual for AI agents using the Recoup API."
 ---
</file context>

title: 'Agents'
description: 'Programmatic agent onboarding — sign up and obtain API keys in one call, no dashboard, no human in the loop.'
title: "Agent Onboarding"
description: "The operating manual for AI agents using the Recoup API."
---

## Quickest start
This page is for AI agents that act on a user's behalf. Follow the steps in order.

Get a working API key in a single unauthenticated request:
<Note>
**Just trying the API yourself?** See [Quickstart](/quickstart) for a 5-minute hello-world. This page is the production operating manual. It covers the throwaway-vs-account decision, the roster, the filesystem, and the agent loop.
</Note>

```bash
curl -X POST "https://api.recoupable.com/api/agents/signup" \
-H "Content-Type: application/json" \
-d '{"email": "agent+'$(date +%s)-$RANDOM'@recoupable.com"}'
```
## 0. Choose your path

Response:
**Ask the human which path they want before authenticating.** Guessing wrong creates records under a throwaway account that can't be recovered if the API key is lost. The user re-prompts later and their roster is gone.

```json
{
"account_id": "123e4567-e89b-12d3-a456-426614174000",
"api_key": "recoup_sk_abc123...",
"message": "If this is a new agent+ email, your API key is included. Otherwise, check your email for a verification code."
}
```
Use this question. Paraphrase if needed, but keep the trade-off explicit:

That's it. Store `api_key`, pass it in the `x-api-key` header on every subsequent request, and you're done.
> "Are you just exploring Recoup, or do you want me to set this up against your account so the work persists? If you have an account, what email should I use? Otherwise I'll create a temporary account, but you won't be able to save artists, releases, or scheduled tasks under it."

<Tip>
**One-liner — sign up and export the key in one shot.** Drop this into your shell and you'll have `$RECOUP_API_KEY` ready to use on the next line:
Once you have the answer, match the human's intent to the right path:

```bash
export RECOUP_API_KEY=$(curl -s -X POST "https://api.recoupable.com/api/agents/signup" \
-H "Content-Type: application/json" \
-d '{"email": "agent+'$(date +%s)-$RANDOM'@recoupable.com"}' | jq -r .api_key)
```
| Human's answer | Auth path | Then |
|----------------|-----------|------|
| "Just exploring / quick demo / one-shot research" | Throwaway [`agent+...@recoupable.com`](#1-authenticate) signup | Use research and content endpoints. **Don't create artists.** They'll orphan when the API key is lost. |
| "I have an account, here's my email" (existing roster) | Sign in with their real email | List [`/api/artists`](/api-reference/artists/list); work with the roster they already have |
| "I have an account, here's my email" (new artist) | Sign in with their real email | Run the [`create-artist`](https://github.com/recoupable/skills/tree/main/skills/create-artist) skill |
| "I don't have an account but I want to set one up" | Sign in with their real email | After auth, run the [`create-artist`](https://github.com/recoupable/skills/tree/main/skills/create-artist) skill to start their roster |

Verify it worked:
**The key distinction:** `agent+` emails create isolated, unrecoverable accounts. Use them ONLY for one-shot work (research, content generation) where losing the API key has no cost. For anything that creates persistent records (artists, releases, scheduled tasks), use the user's real email.

```bash
curl -H "x-api-key: $RECOUP_API_KEY" https://api.recoupable.com/api/accounts/id
```
</Tip>
**When you can skip the question:** if the human's instruction explicitly names the path (e.g., *"just try the demo"*, *"use my Recoup account, my email is x@y.com"*, or you were invoked autonomously by another agent with no human in the loop), you don't need to ask. Proceed directly.

<Tip>
The `agent+{unique-suffix}@recoupable.com` shape is the recommended path for agents — it always returns an API key instantly, with no email verification required. Combining `$(date +%s)` with `$RANDOM` guarantees a fresh, collision-free address on every call (including multiple signups within the same second) and is portable across macOS and Linux shells.
</Tip>
## 1. Authenticate

## How it works
If your human has an API key, pass it via `x-api-key`. If not, generate one based on the path you chose above. **Note**: the throwaway `agent+...@recoupable.com` path returns the API key immediately on signup with no verification step. Skip steps 2 and 3 below.

Two unauthenticated endpoints power agent onboarding:
<Steps>
<Step title="Call signup with their email">
```bash
curl -X POST "https://api.recoupable.com/api/agents/signup" \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com"}'
```
For an `agent+...@recoupable.com` email, the response includes `api_key` directly. Store it (e.g. `export RECOUP_API_KEY=your-api-key`) and you're done. For any other email, the response says a verification code was sent; continue with steps 2 and 3.
</Step>
<Step title="Ask the human for the code">
A 6-digit code was sent to their inbox. Ask them: *"Check your email for a verification code and share it with me."*
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
</Step>
<Step title="Call verify with the code">
```bash
curl -X POST "https://api.recoupable.com/api/agents/verify" \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "code": "123456"}'
```
Store the returned `api_key` (e.g. `export RECOUP_API_KEY=your-api-key`) and pass it as `x-api-key` on every request.
</Step>
</Steps>

- **[`POST /api/agents/signup`](/api-reference/agents/signup)** — Register with an email address. Emails with the `agent+` prefix that have never been seen before receive an API key immediately. Any other email (or a previously-used `agent+` address) receives a 6-digit verification code via email.
- **[`POST /api/agents/verify`](/api-reference/agents/verify)** — Submit the verification code to receive an API key.
**After authenticating, immediately check the roster.** Don't wait for the human to tell you what to do.

Multiple API keys per account are supported — each signup or verification generates a new key without revoking existing ones.
<Warning>
`agent+` emails create a **separate account**. `agent+user@example.com` is NOT linked to `user@example.com`. To work on behalf of an existing human, use their real email.
</Warning>

## Standard signup (email verification)
---

If you're building a human-facing integration and want the user to verify their real email, use any non-`agent+` address:
## 2. Understand the roster

Step 1 — request a verification code:
After getting a key, your next call should always be to check what the human has:

```bash
curl -X POST "https://api.recoupable.com/api/agents/signup" \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com"}'
# List all artists available to this account
curl "https://api.recoupable.com/api/artists" \
-H "x-api-key: $RECOUP_API_KEY"

# List organizations (labels/teams) the account belongs to
curl "https://api.recoupable.com/api/organizations" \
-H "x-api-key: $RECOUP_API_KEY"
```

**If the human has artists**, you can scope work to a specific artist by passing `artist_account_id` on supported endpoints. Research, content, tasks, and fan data all become artist-specific.

**If the human has organizations**, pass `organization_id` to scope to a specific label's roster.

**If neither is specified**, you operate at the account level and can see everything available to the human.

---

## 3. Know the filesystem

Each account has a persistent filesystem backed by a GitHub repo. This is where artist context lives. Files agents use to do informed work.

### Artist directory structure

```
orgs/{org-name}/artists/{artist-slug}/
├── RECOUP.md # Identity file (artistName, artistSlug, artistId)
├── context/
│ ├── artist.md # Brand voice, bio, constraints
│ ├── audience.md # Audience insights, resonance
│ ├── era.json # Current era metadata
│ └── images/
│ └── face-guide.png # Face reference for visual content
├── songs/{song-slug}/
│ └── {song-slug}.mp3 # Audio files
├── releases/{release-slug}/
│ └── RELEASE.md # Release plan and metadata
└── config/
└── content-creation/
└── config.json # Pipeline overrides
```

The `RECOUP.md` file ties the folder to the platform. It contains YAML frontmatter with `artistName`, `artistSlug`, and `artistId`.

Step 2 — submit the 6-digit code from the verification email:
### Accessing sandbox files

```bash
curl -X POST "https://api.recoupable.com/api/agents/verify" \
# List the full file tree
curl "https://api.recoupable.com/api/sandboxes" \
-H "x-api-key: $RECOUP_API_KEY"

# Read a specific file
curl "https://api.recoupable.com/api/sandboxes/file?path=orgs/my-label/artists/drake/context/artist.md" \
-H "x-api-key: $RECOUP_API_KEY"

# Upload files to the repo
# path is top-level (target directory); each file needs url + name
curl -X POST "https://api.recoupable.com/api/sandboxes/files" \
-H "x-api-key: $RECOUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com", "code": "123456"}'
-d '{"path": "orgs/my-label/artists/drake/context", "files": [{"url": "https://...", "name": "audience.md"}]}'
```

Response:
---

```json
{
"account_id": "123e4567-e89b-12d3-a456-426614174000",
"api_key": "recoup_sk_abc123...",
"message": "Verified"
}
```
## 4. Decide what to do

## Using your API key
<Steps>
<Step title="Does the human have a roster?">
Call `GET /api/artists`. If they have artists, list them and ask which one to work with. If not, you can research any artist with `GET /api/research?q=...` or create one with `POST /api/artists`.
</Step>
<Step title="What kind of work?">
**Research.** Use the 30+ research endpoints. Pass `artist_account_id` to scope to a rostered artist, or search by name for any artist globally.

Pass the returned `api_key` in the `x-api-key` header on every authenticated request:
**Content.** Generate images, videos, and captions with the content endpoints. Artist context from the filesystem makes output more on-brand.

```bash
curl -X GET "https://api.recoupable.com/api/tasks" \
-H "x-api-key: YOUR_API_KEY"
**Manage.** Plan and track releases by creating and updating `RELEASE.md` files in the artist's `releases/` directory. Add songs to catalogs, update artist context, and organize the roster.
</Step>
<Step title="Should you save the work?">
Save research, generated content, or notes to the artist's directory in the filesystem so future calls have more context. Use `POST /api/sandboxes/files` to upload files to the repo.
</Step>
<Step title="Should this be recurring?">
If the human asks for something more than once, or if the work is time-sensitive and repeating, turn it into a task with `POST /api/tasks`.

Good candidates for tasks:
- Daily or weekly reports (streaming stats, fan growth, playlist adds)
- Monitoring competitors or trending artists
- Generating recurring content (weekly social posts, monthly recaps)
- Checking release milestones as a date approaches

If the human only needs it once, just do it. Don't create a task for everything.
</Step>
</Steps>

---

## Base URL

```
https://api.recoupable.com/api
```

See [Authentication](/authentication) for the full authentication model, including organization access and Bearer token support, and [Quickstart](/quickstart) for your first end-to-end request.
All endpoints require `x-api-key` header unless noted. See [Authentication](/authentication) for the full auth model, and the [endpoint map](/#for-ai-agents) for every available endpoint.
4 changes: 0 additions & 4 deletions api-reference/comments/get.mdx

This file was deleted.

2 changes: 1 addition & 1 deletion api-reference/image/generation.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
title: 'Generate Image'
title: 'Generate Image (Legacy)'
openapi: "/api-reference/openapi/content.json GET /api/image/generate"
---
2 changes: 1 addition & 1 deletion api-reference/openapi/ai.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"servers": [
{
"url": "https://recoup-api.vercel.app"
"url": "https://api.recoupable.com"
}
],
"paths": {
Expand Down
Loading