Replicate API keys

25 community-sourced Replicate keys, re-checked against the API. Copy a key below, export it as REPLICATE_API_TOKEN, and send requests to https://api.replicate.com/v1.

Keys

Using your Replicate key

Export the key as REPLICATE_API_TOKEN, then call the API at https://api.replicate.com/v1.

export REPLICATE_API_TOKEN="your-key-here"

curl

curl https://api.replicate.com/v1/chat/completions \
  -H "Authorization: Bearer $REPLICATE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "meta/meta-llama-4-scout",
    "messages": [{"role": "user", "content": "Say hello"}]
  }'

Python (OpenAI SDK)

from openai import OpenAI
import os

client = OpenAI(
    api_key=os.environ["REPLICATE_API_TOKEN"],
    base_url="https://api.replicate.com/v1",
)

resp = client.chat.completions.create(
    model="meta/meta-llama-4-scout",
    messages=[{"role": "user", "content": "Say hello"}],
)
print(resp.choices[0].message.content)

Node.js

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.REPLICATE_API_TOKEN,
  baseURL: "https://api.replicate.com/v1",
});

const resp = await client.chat.completions.create({
  model: "meta/meta-llama-4-scout",
  messages: [{ role: "user", content: "Say hello" }],
});
console.log(resp.choices[0].message.content);