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

# Developer quickstart

> Sign up, mint a key, run your first tool and send your first email from an identity's inbox.

Four steps from nothing to an agent that can look things up and send real mail.

> [!TIP]
>
> **No code?** [Connect Naive to ChatGPT or Claude](https://vetta.sh/docs/developers/connect.md) in about two minutes and ask for tools and
> email in plain words. The steps below are for your own code.

**1. Sign up**

Go to [developers.usenaive.ai](https://developers.usenaive.ai) and sign in with your email: we send you a
code (Continue with Google and password sign-in work too). Name your workspace. A new workspace comes with a
small starter credit so you can try tools right away.

The console then opens with a short setup guide: pick the agent you use (ChatGPT, Claude, Claude Code, Codex,
Cursor, Windsurf, OpenCode, your own code or another agent) and it shows that agent's setup. Coding agents get
one line to send in their chat, `set up https://usenaive.ai/developers/skill.md`. Skip it any time; reopen it
from the account menu under **Setup guide**.

> [!NOTE]
>
> Already have a studio account at app.usenaive.ai? Sign in with the same email. Your developer workspace is
> separate, and your studio workspaces are untouched.

Sending to anyone other than yourself, buying a domain, live trading and computers need a funded workspace: add
\$10 or more under **Usage → Top up**.

**2. Mint a key**

Open **Connect → Keys** and choose **Create key**. The preset starts on **Tools only**; switch it to
**Tools + resources** so step 4 can make an identity and send email. Keep the default expiry (90 days) and spend
cap (\$20 a day), and copy the secret. It is shown once.

```bash theme={"system"}
export NAIVE_API_KEY=sk_live_...
```

Presets, expiry, rotation and budgets are on [Keys](https://vetta.sh/docs/developers/keys.md).

**3. Run your first tool**

Find a tool in the console's **Tools** page, or search from code:

```bash curl theme={"system"}
curl https://api.vetta.sh/v1/tools?q=image \
  -H "Authorization: Bearer $NAIVE_API_KEY"

curl https://api.vetta.sh/v1/tools/runs \
  -H "Authorization: Bearer $NAIVE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: first-run-1" \
  -d '{ "tool": "image.generate", "input": { "prompt": "a ceramic mug on a walnut desk, morning light" } }'
```

```ts TypeScript theme={"system"}
// npm i @usenaive-sdk/naive
import { createNaive } from "@usenaive-sdk/naive";

const client = createNaive({ apiKey: process.env.NAIVE_API_KEY! });

const found = await client.tools.search({ q: "image" });
const run = await client.tools.run("image.generate", {
  prompt: "a ceramic mug on a walnut desk, morning light",
}, { wait: true });
console.log(run.status, run.cost_usd, run.output);
```

The answer is a `run` with its `output` and exactly what it cost. Slow media tools can answer `status: "pending"`;
`wait: true` (`--wait` in the CLI) polls until the run settles, or poll `GET /v1/tools/runs/{id}` yourself. See [Tools](https://vetta.sh/docs/developers/tools.md).

**4. Send your first email**

Create an identity, give it an inbox on the shared Naive mail domain (no DNS needed), and send.

```bash curl theme={"system"}
IDN=$(curl -s https://api.vetta.sh/v1/identities \
  -H "Authorization: Bearer $NAIVE_API_KEY" -H "Content-Type: application/json" \
  -d '{ "name": "Support" }' | jq -r .id)

EML=$(curl -s https://api.vetta.sh/v1/identities/$IDN/emails \
  -H "Authorization: Bearer $NAIVE_API_KEY" -H "Content-Type: application/json" \
  -d '{}' | jq -r .id)

curl https://api.vetta.sh/v1/identities/$IDN/emails/$EML/send \
  -H "Authorization: Bearer $NAIVE_API_KEY" -H "Content-Type: application/json" \
  -d '{ "to": ["you@example.com"], "subject": "Hello", "text": "Sent by my agent." }'
```

```ts TypeScript theme={"system"}
const support = await client.identities.create({ name: "Support" });
const inbox = await client.emails.create(support.id, {});
await client.emails.send(support.id, inbox.id, {
  to: ["you@example.com"],
  subject: "Hello",
  text: "Sent by my agent.",
});
```

`POST /v1/identities/{id}/emails` with an empty body picks an address on the shared domain. Send to your own
sign-in email works before you fund the workspace; anyone else needs a funded workspace. Replies land in
`GET /v1/identities/{id}/messages` and, if you subscribe, as an [`email.received` webhook](https://vetta.sh/docs/developers/webhooks).

> [!NOTE]
>
> If the identity's rules say **Send email: Always**, the send answers `202` with an `approval` instead of
> sending. Approve it in the console and it goes out. See [Approvals](https://vetta.sh/docs/developers/approvals.md).

## What the free credit covers

A new workspace starts with $1 of free credit. Some calls also wait for the workspace's first top-up of $10 or more
(**Usage → Top up**), whatever the balance says. Until then they answer `402 funding_required`, and the message
names what is gated and links to the top-up page.

* Free credit covers: data, search and social data tools, image generation, model routing, stock media search, identities and inboxes, email to your own team, domain checks, paper trades, vaults and webhooks.
* Needs a first \$10 top-up: AI video, voice, music, sound effects, 3D, edits, clips and transcription; email to people outside your workspace; phone numbers and texts; live trades and buying domains (72 hours after your first top-up); computers, browsers and phone sandboxes; social posting; connected apps; hosted apps; identity verification; character training.

Each tool endpoint in `GET /v1/tools/{slug}` carries `needs_funding`, and each resource action carries `funded`.

## Next

* [Connect ChatGPT, Claude, Cursor or any MCP client](https://vetta.sh/docs/developers/connect.md)
* [Resources](https://vetta.sh/docs/developers/resources.md): domains, brokerage, computers, vaults and the rest
* [Identities and approval rules](https://vetta.sh/docs/developers/identities.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.