---
name: parity-layer-setup
description: Install Parity Layer into an application to reduce OpenAI, Anthropic or Google API spend by 30 to 60% on proven prompts, without changing any model strings or prompts. Use when asked to cut LLM API costs, reduce inference spend, or route to a cheaper model safely. You are the installer, not the workload: change only the application's LLM client configuration, and never point a coding agent at Parity as its own model backend.
---

# Set up Parity with your coding agent

Your coding agent integrates Parity in one paste. Parity routes your app's
AI traffic; the agent just does the two-line swap for you.

Parity is not for coding agents themselves. The agent here is the
installer, wiring Parity into the application it is working on.

## What the agent changes

Two lines per LLM client: the base URL becomes `https://api.paritylayer.com/v1`, and the
key becomes your Parity key. Your model strings, prompts, parameters,
tools, and streaming stay exactly as they are. There are no
account-specific model IDs to learn and no request-schema migration.

## Steps

1. Sign up at https://dashboard.paritylayer.com (free, no credit card).
2. Open **Set up with your coding agent** and click **Copy prompt**. The
   prompt carries a one-time setup link that expires in 15 minutes and
   works once.
3. Paste it into Claude Code, Cursor, Codex, or any coding agent working
   in your repository.
4. The agent fetches a key without printing it, swaps the base URL and
   key, sends one verification request, and reports back.

## The prompt (generic form)

If you are reading this without a dashboard session, this is the prompt
to paste. It tells the agent to ask you for the one-time link first.

```text
Integrate Parity Layer (paritylayer.com) into THIS application so the app's
own LLM calls route through Parity.

FIRST: ask the developer to open https://dashboard.paritylayer.com, click "Set up with your
coding agent", and paste the generated prompt here. That prompt carries a
one-time setup link. Without it you cannot fetch credentials, and you must
not ask the developer to paste an API key into this conversation.

Then follow the instructions in that prompt. In summary, what you will do:
- fetch a key from the one-time link (never printing it) into the app's
  secret store as PARITY_API_KEY;
- point every OpenAI / Anthropic / OpenAI-compatible client at
  https://api.paritylayer.com/v1 using that key, changing nothing else (same model
  strings, same prompts, same parameters);
- send one request and confirm with
  GET https://api.paritylayer.com/v1/setup/verify;
- report which files changed and which call sites you skipped.

You are the installer, not the workload: do not reconfigure yourself or
any other coding agent to use Parity.
```

## Verifying

```bash
curl -fsS https://api.paritylayer.com/v1/setup/verify \
  -H "Authorization: Bearer $PARITY_API_KEY"
```

Returns `{"requests_seen": N, "proving": "on", "groups_discovered": N}`.
Once `requests_seen` is at least 1, Parity is seeing your traffic and
proving has started. Nothing routes to a cheaper model until a proof
passes and you click Activate.

## Security

The API key never appears in the web page, the prompt, the deep link, or
the agent's transcript. The agent fetches it from a single-use link that
expires in 15 minutes; a second use of that link returns 410. The key is
minted named `agent-setup <date>` so you can revoke it on its own.

## Undo

Undo is one revert: put the original base_url and key back in the
client construction. Parity keys can also be revoked from the dashboard
under Settings, which stops all routing immediately.

## No live traffic yet?

Use the offline proof instead: <https://paritylayer.com/docs/offline-capture.md>.
It produces a JSONL capture file Parity proves savings from without
routing any traffic.
