Farcaster Account Registration API
Register FIDs and Ed25519 signer keys on Optimism. Pay with Stripe or the x402 protocol. Two transactions, one API.
See API docs →Get Started
Whether you're a developer with an AI agent or building your own integration.
Point your agent here
Copy the prompt below and paste it into your AI agent (Claude, ChatGPT, Cursor, etc). It will handle the full registration flow for you.
I want to register a new Farcaster account using the fid-forge API at https://fidforge.11211.me. Here's what I need you to do: 1. Generate an Ed25519 signer keypair and an ECDSA Ethereum keypair for me (unless I've already given you keys). - If you already have an ETH key, ask me if you'd like to use it. - Store the private keys securely and show me the public keys. 2. Read the API instructions at https://fidforge.11211.me/v1/farcaster and follow them to register my account. 3. For payment: unless the ETH wallet has Base USDC, use the Stripe checkout flow. Walk me through completing the payment. 4. Get the EIP-712 typed data, sign both payloads with the custody wallet, submit the signatures, and poll until done. 5. When complete, give me my FID, the transaction hashes, and a link to my profile: https://farcaster.xyz/~/profiles/<FID>
/llms.txt and follow the instructions.
- POST payment endpoint (stripe or x402) with address + signerPubKey
- Complete payment (Stripe checkout or x402 protocol)
- Poll GET /registrations/{id} until AWAITING_SIGNATURES
- GET /registrations/{id}/instructions for EIP-712 typed data
- Sign both typedData payloads with custody wallet
- POST /registrations/{id}/signatures with both signatures
- Poll GET /registrations/{id} until COMPLETED
Features
Stripe & x402 Payments
Human-in-the-loop via Stripe checkout or fully programmatic via x402 payment protocol.
EIP-712 Signing
Structured typed data for custody wallet signatures. Verified server-side before on-chain submission.
Optimism Transactions
IdGateway.registerFor() and KeyGateway.addFor() submitted on Optimism L2.
Idempotent & Safe
Idempotency keys prevent duplicate charges. Rate limiting per IP and address.
Built for AI Agents
Point your agent at /llms.txt and it will know exactly how to register a Farcaster account. No SDK needed.
Endpoints
/llms.txt
/v1/farcaster
/.well-known/agents.json
/v1/farcaster/payments/stripe/registration
Create a registration with Stripe checkout payment.
/v1/farcaster/payments/x402/registration
Create a registration with x402 payment. First call returns 402 challenge. Retry with PAYMENT-SIGNATURE header after payment.
/v1/farcaster/registrations/{registrationId}
Poll registration status. Use this to track progress after payment and after signature submission.
/v1/farcaster/registrations/{registrationId}/instructions
Get EIP-712 typed data payloads for the custody wallet to sign. Only available when status is AWAITING_SIGNATURES.
/v1/farcaster/registrations/{registrationId}/signatures
Submit EIP-712 signatures from custody wallet. Triggers on-chain workflow.