# Replicate setup for PopMCP

You paste one value into PopMCP: a Replicate API token, which starts with r8_.

- Auth: API credentials
- Setup time: 1 min
- API base URL: https://api.replicate.com/v1
- Credentials screen: https://replicate.com/account/api-tokens
- Provider docs: https://replicate.com/docs/topics/security/api-tokens

## Before you begin

- A Replicate account. You sign in to Replicate with a GitHub account
- Prepaid credit on the account, if your AI will run models. Replicate takes payment up front under Account, then Billing. Searching models and reading past runs need no credit

## Get your credentials

### 1. Open your API tokens in Replicate

Sign in to Replicate and open replicate.com/account/api-tokens. To connect an organization, use a token that belongs to that organization. A token reaches everything on its account and has no permission options, so choose the right account now. You can connect another later with its own token.

Screen: https://replicate.com/account/api-tokens

### 2. Create a token for PopMCP and copy it

Replicate makes a default token when you sign up, and you could use that one. A separate token is better: give it a name like PopMCP and create it, then copy it. You can later turn this one off without touching your other apps.

Screen: https://replicate.com/account/api-tokens

### 3. Paste the token into PopMCP

In PopMCP, paste the token into API token and connect. PopMCP checks it by reading your account name from Replicate. New connections start read-only, so your AI can search models and read past runs but cannot start a run or spend credit until an owner or admin allows write actions.

## Fields PopMCP asks for

- API token (apiToken) [required]: In Replicate open Account, then API tokens, and copy a token. It starts with r8_. Stored encrypted and used only on our servers.

## Verify

PopMCP marks the Replicate connection Verified and labels it with your account name and username. Asking the AI to find a model for a task, then to show that model's inputs, returns real results at no cost.

## Troubleshooting

### "Replicate did not accept this API token..."

Cause: The token was copied incompletely or has been turned off.

Fix: Open replicate.com/account/api-tokens and copy a token that is still active. It starts with r8_ and is 40 characters long.

### "That is a webhook signing secret..."

Cause: A value starting with whsec_ was pasted. It proves webhooks came from Replicate and cannot call the API.

Fix: Paste an API token from replicate.com/account/api-tokens instead.

### The AI says it cannot run a model

Cause: The connection is read-only, which is how every new connection starts. Running a model spends credit, so it counts as a write.

Fix: Have an owner or admin allow write actions on the connection in PopMCP.

### Runs are refused because of credit, or stop starting

Cause: The account's prepaid credit is used up. At zero, Replicate starts no new work and shuts down what it is running for you.

Fix: Add credit under Account, then Billing, in Replicate. Auto reload keeps it from running out.

### "Nothing was started and nothing was spent..."

Cause: An input does not match the model: an unknown name, a value outside its limits, or a file given as a path on a computer.

Fix: The message names each problem. The AI can read the model's inputs and try again. For a file with no public link, it can upload the file first.

### An output link no longer opens

Cause: Replicate removes the inputs, outputs, files and logs of an API run about an hour after it runs.

Fix: Save what you want to keep as soon as the run ends. Past that, run the model again.

### A run says it is still going when the AI stops waiting

Cause: Long models outlast one wait. The run carries on at Replicate, and it stops by itself after 30 minutes.

Fix: Ask the AI to keep waiting for the same run. It has the id. Starting again would pay twice.

### Tools fail with 429

Cause: Replicate allows 600 run creations and 3000 other requests per minute. Limits are stronger when credit runs low, and only 6 requests per minute with granted credit and no payment method.

Fix: The answer says when the limit resets. Adding a payment method or more credit lifts the lower limits.

---

Source: https://www.docs.popmcp.com/docs/integrations/replicate/