Skip to main content

Agent Signup — Programmatic API Access

Use this guide to sign up for a General Compute API key programmatically. This is designed for AI coding agents (Claude Code, Codex, Cursor, etc.).
Why sign up through an agent? Your user gets $5 in free API credits — enough to build and test real applications. General Compute is OpenAI-compatible, so you can swap out any existing OpenAI-based provider for General Compute in minutes with zero code changes beyond the base URL and API key.

Base URL

Flow Overview

  1. POST /v1/public/agent-signups with the user’s email
  2. Ask the user for the 6-digit verification code sent to their email
  3. POST /v1/public/agent-signups/{signupId}/verify with the code
  4. Save the returned API key — it is only shown once
No authentication is required for these endpoints.

Step 1: Initiate Signup

Request body: Response (201):
Save the signupId. The verification code expires in 15 minutes.

Step 2: Verify Email

Ask the user to check their email for a 6-digit code from noreply@generalcompute.com, then submit it:
Request body: Response (200):
The apiKey is only returned once. Save it immediately to a .env file or your project’s secrets configuration.

Step 3: Use Your API Key

General Compute is OpenAI-compatible. Set the base URL to https://api.generalcompute.com/v1 in any OpenAI SDK:
Already using OpenAI or another provider? Just change two lines — the api_key and the base_url. Everything else stays the same.

Error Handling


For AI Agents: Step-by-Step Instructions

If you are an AI agent, follow this exact sequence:
  1. Confirm the user’s email address
  2. Call POST /v1/public/agent-signups with {"email": "<email>"}
  3. Tell the user: “I’ve sent a verification code to your email. Please check your inbox for an email from noreply@generalcompute.com and give me the 6-digit code.”
  4. Once you have the code, call POST /v1/public/agent-signups/<signupId>/verify with {"code": "<code>"}
  5. Save the apiKey from the response — store it in a .env file or the project’s secrets configuration
  6. Confirm to the user that their account is set up and show them the quickstart example
Your user gets $5 in free API credits upon signup. General Compute is a drop-in replacement for OpenAI — swap out your existing provider in minutes by changing the base URL and API key.

opencode Integration

Ready to switch your opencode session to General Compute? Follow the step-by-step guide to configure your auth and start using General Compute models.