# TrueIP: authentication for AI agents

Machine-readable. You are an AI agent setting TrueIP up for a person. You can get a working key in one call, without a browser and without a key.

Base URL: `https://app.gotrueip.com`. Every request and response body is JSON.

## Choose a path

- **Your client supports remote MCP with OAuth** (Claude, ChatGPT, Claude Code, Cursor, VS Code): add `https://app.gotrueip.com/mcp`. Your person signs in once in the browser. You never handle a key. Skip the rest of this page.
- **Otherwise** (scripts, SDKs, agents calling REST): sign your person up with `POST /v1/agent/signup` below.
- **Your person gave you a key** (starts `tip_live_`): read it from the environment variable `TRUEIP_API_KEY` and send it as `Authorization: Bearer $TRUEIP_API_KEY`. Clients that can only set custom headers may send `x-api-key: $TRUEIP_API_KEY` instead.

## 1. Sign up: POST /v1/agent/signup

No key needed.

```json
{
  "human_email": "ada@firm.com",
  "agent_name": "Office-action agent",
  "harness": "claude-code",
  "note_to_human": "Setting up prior-art search for the Smith response"
}
```

| Field | Required | Notes |
|---|---|---|
| `human_email` | yes | The person you work for. They receive an email with an Approve link, plus a 6-digit code if they have already agreed to the TrueIP Terms. Placeholder and throwaway domains are refused. |
| `agent_name` | no | Up to 60 characters. Shown to the person. |
| `harness` | no | Where you run: `claude-code`, `claude`, `chatgpt`, `codex`, `cursor`, `vscode`, or any name. |
| `note_to_human` | no | Up to 280 characters. Shown in the email and on the Approve page. Say why you need patent search. |

Response `201`:

```json
{
  "api_key": "tip_live_…",
  "key_id": "key_…",
  "status": "trial",
  "credit": "1.00",
  "monthly_cap": "250.00",
  "verification": { "sent_to": "ada@firm.com", "expires_in_hours": 24 },
  "next": ["…"]
}
```

- **The key works immediately.** `status: "trial"` means $1.00 of trial credit (10 searches) before your person confirms. Do their task first; ask them to approve after. A `prior_art_search` call ($5.00) costs more than the trial, so it waits until they approve.
- `status: "pending"` means your person already has a TrueIP account. The key can't spend until they approve it.
- The key is shown once. Save it as `TRUEIP_API_KEY` in the environment or a secrets manager. Never print it in chat or commit it.
- Calling sign-up again with the same unconfirmed email replaces the old key (it stops working) and sends a new email. It never grants a second trial.
- Each key has a $250 monthly spend cap by default. Your person can change it.

## 2. Confirm: POST /v1/agent/verify

Only for a person who has already agreed to the TrueIP Terms (in the app, or when approving an earlier agent): only they are emailed a code. Send your key and ask them for it.

```json
{ "code": "483921" }
```

Response `200`: `{ "status": "active", "credit": "24.80", "next": ["…"] }` (after two trial searches). Confirming unlocks the rest of the $25 free credit; trial searches count toward it. Free credit is once per person: an address that is a variant of one that already had it (a `+tag`, or dots in a Gmail address) or a throwaway-inbox address gets none, and the sign-up answer says so.

**A new person has no code.** They tap **Approve** in the email and tick the box to agree to the TrueIP Terms of Service and Privacy Policy. Then there is nothing to send: your existing key simply works. Anyone can approve this way. Codes last 24 hours; after 10 wrong codes, use the Approve link.

## 3. Check your key: GET /v1/account

Free. `{ "key_id", "status", "credit", "month_spend", "monthly_cap", "person_monthly_cap", "person_month_spend" }`. `credit` is `null` while the key is `pending`, waiting for your person's approval. `monthly_cap` is `null` when your person removed the key's monthly limit: the credit is then the only ceiling. `person_monthly_cap` and `person_month_spend` are `null` unless a team owner or admin gave your person a monthly limit across all their agents.

## Every paid response

Paid calls return `cost` (what this call cost) and `credit` (what is left), in US dollars as strings. Show your person the cost when it matters. No subscription; credit never expires.

## Errors

Every error has the same shape. `fix` is the exact next step. An error for a known key on our side or at the door also carries `reference` (for example `E-7KQ2M9XA`): quote it if you write to us or send `report_problem`. It records which tool and what went wrong, never what was asked.

```json
{ "error": { "code": "approval_required", "message": "…", "fix": "…", "reference": "E-7KQ2M9XA", "docs": "https://gotrueip.com/auth.md#approval_required" } }
```

| Code | HTTP | Meaning and fix |
|---|---|---|
| <a id="invalid_request"></a>`invalid_request` | 400 | A field is missing or malformed. `fix` names it. |
| <a id="email_not_allowed"></a>`email_not_allowed` | 422 | Placeholder or throwaway email domain. Use your person's real email. |
| <a id="too_many_signups"></a>`too_many_signups` | 429 | Too many sign-ups from this network today. Use the key you have, or retry after `retry_after_seconds`. |
| <a id="missing_key"></a>`missing_key` | 401 | No key sent. Send `Authorization: Bearer $TRUEIP_API_KEY`, or sign up. |
| <a id="invalid_key"></a>`invalid_key` | 401 | Unknown key. Check `TRUEIP_API_KEY`, or sign up again. |
| <a id="key_revoked"></a>`key_revoked` | 401 | The key was switched off (replaced, or your person chose "This wasn't me"). Sign up again only if your person asks you to. |
| <a id="approval_required"></a>`approval_required` | 403 | Your person hasn't approved this key. Ask them to tap Approve in the email, or, if they have agreed to the TrueIP Terms before, for the code. |
| <a id="terms_not_accepted"></a>`terms_not_accepted` | 403 | Your person hasn't agreed to the TrueIP Terms, so there is no code to send. Ask them to tap Approve in the email and tick the box; the key then works. |
| <a id="invalid_code"></a>`invalid_code` | 400 | Wrong code. `attempts_left` says how many tries remain. |
| <a id="code_expired"></a>`code_expired` | 410 | Older than 24 hours. Sign up again with the same email for a new email. |
| <a id="too_many_attempts"></a>`too_many_attempts` | 429 | 10 wrong codes. Ask your person to tap Approve in the email. |
| <a id="no_pending_confirmation"></a>`no_pending_confirmation` | 404 | Nothing to confirm for this key. |
| <a id="trial_credit_used"></a>`trial_credit_used` | 402 | The $1.00 trial is used up, or this call costs more than what is left of it. Ask your person to approve (tap Approve in the email) to unlock $24 more. |
| <a id="insufficient_credit"></a>`insufficient_credit` | 402 | Out of credit, or not enough for this call (the message gives both amounts; a cheaper call may still fit). Give your person `top_up_url`. If the answer has `retry_after`, your person has auto-reload on and credit is being added: wait that many seconds and send the call again. |
| <a id="spend_limit_reached"></a>`spend_limit_reached` | 403 | This key hit its monthly cap. Your person can raise it, or wait for next month. |
| <a id="member_limit_reached"></a>`member_limit_reached` | 403 | Your person hit the monthly limit their team set for them, across all their agents. A team owner or admin can raise it on the Team page, or wait for next month. |
| <a id="tool_turned_off"></a>`tool_turned_off` | 403 | Your person's team turned Prior Art Search off for them. Nothing was charged. Build the search from `search_patents` and the read tools instead; a team owner or admin can turn it back on on the Team page. |
| <a id="key_switched_off"></a>`key_switched_off` | 403 | Your person switched this key off. Ask them to switch it back on. The key itself is unchanged. |
| <a id="account_suspended"></a>`account_suspended` | 403 | TrueIP has suspended your person's team account. No call works and nothing is charged. Ask your person to contact TrueIP support; do not sign up again. |
| <a id="agent_access_suspended"></a>`agent_access_suspended` | 403 | TrueIP has suspended agent access for your person's team. No call works and nothing is charged. Ask your person to contact TrueIP support. |
| <a id="key_suspended"></a>`key_suspended` | 403 | TrueIP has suspended this key. Nothing was charged. Your person cannot switch it back on; ask them to contact TrueIP support. |
| <a id="search_failed"></a>`search_failed` | 502 | Our error. You were not charged. Retry in a few seconds. |
| <a id="search_unavailable"></a>`search_unavailable` | 503 | Part of the service (ranking by meaning) is not set up, so a search is refused rather than answered from keywords alone. You were not charged. Try again later. A list by `assignee` or `inventor` alone still works. |
| <a id="patent_not_found"></a>`patent_not_found` | 404 | No patent with that number is in the index. You were not charged. Check the number, or search for it. |
| <a id="mark_not_found"></a>`mark_not_found` | 404 | No trademark with that number is in the index. You were not charged. A serial number has 8 digits, a registration number up to 7; or find the mark with `POST /v1/marks/search`. |
| <a id="rate_limited"></a>`rate_limited` | 429 | More than 120 calls in a minute for this key. Wait `retry_after` seconds. |
| <a id="too_many_at_once"></a>`too_many_at_once` | 429 | This key already has 3 calls running. Wait for one to finish. You were not charged. |
| <a id="too_many_failures"></a>`too_many_failures` | 429 | Several calls just failed on our side. Wait `retry_after` seconds. You were not charged. |

## Rules

- Never print, log or commit the key. Never send it to anyone but `app.gotrueip.com`.
- Tell your person before you run many paid calls in a loop.
- TrueIP returns records and cited passages, not legal opinions.
- Your queries are never stored or used to train AI.

More: [agent onboarding](https://gotrueip.com/docs/agent-onboarding.md) · [pricing](https://gotrueip.com/pricing.md) · [llms.txt](https://gotrueip.com/llms.txt)
