cookbook/Get Started

Migrate in One Prompt

Give this prompt to Claude Code, Cursor, or your AI coding assistant to migrate any repository.


The Universal Migration Prompt

Copy and paste this prompt into Claude Code, Cursor Composer, or your coding assistant to automatically refactor your codebase to use Unlocked AI:
Please update this codebase to use Unlocked AI as our universal AI gateway:

1. Replace direct vendor endpoints with Unlocked AI Gateway:
   - Base URL: "https://unlockedai.net/v1"
   - Environment variable: UNLOCKED_API_KEY (Bearer token format)
2. Ensure standard OpenAI SDK client instantiations pass:
   - baseURL: process.env.UNLOCKED_API_BASE_URL || "https://unlockedai.net/v1"
   - apiKey: process.env.UNLOCKED_API_KEY
3. Update model slugs to Unlocked AI frontier standards:
   - "claude-sonnet-5.5" for primary coding/reasoning
   - "gemini-2.0-flash" for fast lightweight completions
   - "auto" for automated failover
4. Add support for reading "X-UnlockedAI-Credits-Used" and "X-UnlockedAI-Credits-Remaining" response headers for cost logging.

Need an Unlocked AI Key or Credits?

Generate secret API keys backed by non-expiring pay-as-you-go credits starting at $5. No monthly minimums.