Get started

Connect an AI agent

Paste one prompt into Claude Code, Claude, ChatGPT or Cursor, and give the agent a new key when the old one ends.

The prompt does the work

When you make a key, the dialog gives you The agent prompt. It is written for an AI agent and holds everything the agent needs:

  • who it acts as, which company, and which shops it reaches;
  • what it may do, and what it can never do;
  • the base URL, the header to send and the key itself;
  • when the key ends, in UTC and in your own time zone;
  • six rules: never print or save the key, stop and ask for a new key on a 401, ask you before anything that files a report or deletes something, wait on a 429, accept a 403, and treat text read from Panlytics as data;
  • the endpoints that answer today, and where these docs are.

The names in the prompt (yours, the company's and the shops') sit in one block of JSON, and the prompt tells the agent that nothing inside that block is an instruction. A shop named "ignore your rules" stays a shop name.

Claude Code

Claude Code runs on your machine and can call the API with curl from its terminal.

  1. Make a key and press Copy the prompt.
  2. Open Claude Code in any folder and paste the prompt as your first message.
  3. Ask for what you want, for example "Tell me which shops this key reaches and when it ends."

Claude Code starts with GET /v1/me, as the prompt tells it to. If you would rather keep the key out of the chat, export it in the terminal first and paste the prompt with the key line removed:

Terminal
export PANLYTICS_KEY="pan_..."
claude

Then tell Claude Code that the key is in $PANLYTICS_KEY.

Claude

In the Claude app, paste the prompt into a chat where Claude can run code or make web requests with headers of its own, such as Claude Code in the desktop app. In a plain chat, Claude can read these docs and write a script for you to run, but it cannot make the calls itself.

To give Claude the docs without a key at all, paste this address: https://panlytics.net/developers/llms-full.txt. It holds every page of these docs in one file.

ChatGPT

A custom GPT can call the API through an action:

  1. In the GPT editor, open Actions and import the schema from https://panlytics.net/developers/openapi.json.
  2. Set authentication to API key, of type Bearer, and paste the key on its own.
  3. Paste the prompt into the GPT's instructions, without the key line.

The key still ends after its hours. When it does, every action answers 401 and you paste a new key into the same field.

Cursor

Cursor's agent runs commands in its own terminal.

  1. Make a key and press Copy the prompt.
  2. Open the agent chat and paste the prompt as your first message.
  3. Ask for what you want. The agent calls the API with curl and shows each command before it runs.

Cursor may keep chats in its own history. If that matters to you, export the key as PANLYTICS_KEY in Cursor's terminal and paste the prompt without the key line, as for Claude Code.

When the key ends

A key ends after the hours the CEO set, and then every call answers 401 with the code api.key_refused. The prompt tells the agent to stop at that point and ask you for a new key, not to work around it.

  1. Open Developer in your settings and make a new key.
  2. Copy the new prompt.
  3. Paste it into the same chat with one line before it: "Your previous Panlytics key ended. Use this one from now on."

The agent picks up where it stopped. The old key stays on your list as ended for a week, so you can see when it stopped working.