API Documentation
Complete guide to integrating FizzlyCode's AI-powered API with your applications
Getting Started
FizzlyCode provides a powerful API that gives you access to state-of-the-art AI models for code generation and assistance. Follow these steps to get started quickly:
1Create Your Account
Sign up for a FizzlyCode account to get started. You'll receive your first API key automatically.
Create Account2Get Your API Key
Navigate to your dashboard and copy your API key. Keep it secure and never share it publicly.
sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3Make Your First Request
Use your API key to make your first request to our API endpoint.
Authentication
All API requests must include your API key in the Authorization header. Your API key should be prefixed with "Bearer".
Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Security Note: Never expose your API key in client-side code or public repositories. Always make API calls from your backend server.
Claude Code Integration
Complete guide to installing and configuring Claude Code to work with FizzlyCode. Claude Code is an AI-powered coding assistant that helps you write, debug, and improve code directly from your terminal.
Installation Guide
System Requirements
Supported Platforms:
- ✓Windows 10/11 (PowerShell, CMD, Git Bash)
- ✓macOS 10.15+ (Terminal, iTerm2)
- ✓Linux (Ubuntu, Debian, RHEL, etc.)
Requirements:
- •Node.js 18+ (download from nodejs.org)
- •npm (comes with Node.js)
- •Your FizzlyCode API key
1Install Node.js
Download and install Node.js from the official website. Choose the LTS version for stability.
• Windows: Download the .msi installer and run it
• macOS: Download the .pkg installer or use Homebrew: brew install node
• Linux: Use your package manager or download from nodejs.org
2Install Claude Code
Once Node.js is installed, open your terminal and run this command:
npm install -g @anthropic-ai/claude-code
• Windows: Use PowerShell, CMD, or Git Bash
• macOS/Linux: Use Terminal
• Verify installation: Run claude --version
Configuration
3Configure Claude Code
Create a settings file (works on all operating systems):
Create file: ~/.claude/settings.json
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "your-api-key-here",
"ANTHROPIC_BASE_URL": "https://fizzlycode.com/api",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": 1
},
"permissions": {
"allow": [],
"deny": []
}
}
• Replace your-api-key-here
with your actual FizzlyCode API key
• This method works identically on Windows, macOS, and Linux
Alternative: Environment Variables (click to expand)
Windows (PowerShell):
$env:ANTHROPIC_AUTH_TOKEN = "your-api-key-here"
$env:ANTHROPIC_BASE_URL = "https://fizzlycode.com/api"
macOS/Linux (bash/zsh):
export ANTHROPIC_AUTH_TOKEN="your-api-key-here"
export ANTHROPIC_BASE_URL="https://fizzlycode.com/api"
Note: Environment variables are session-specific. Add them to your shell profile (.bashrc, .zshrc, or PowerShell $PROFILE) for persistence.
4Verify Installation
Test that Claude Code is properly installed and configured:
# Check Claude Code version
claude --version
# Verify configuration
claude doctor
# Start using Claude Code
claude "Hello, can you help me write a Python function?"
✓ If everything is set up correctly, Claude Code will respond to your query!
Troubleshooting
"Command not found" error
Ensure Node.js and npm are installed correctly. Run node --version
and npm --version
to check. If missing, reinstall Node.js from nodejs.org.
API connection error
Check that your API key is correct in ~/.claude/settings.json
. The key should start with your plan prefix (e.g., cr_ for free tier).
Settings file not found
Create the directory first: mkdir -p ~/.claude
then create the settings.json file.
Permission denied during install
On macOS/Linux, never use sudo with npm. If you get permission errors, reconfigure npm to use a user directory.
Pro Tip
Run claude doctor
for automatic diagnosis of common issues and configuration problems.
Pro Tip: Claude Code automatically updates itself to the latest version. Run claude doctor
to check your installation status and available updates.
Gemini CLI Integration
Configure Gemini CLI to use FizzlyCode for enhanced AI capabilities with Google's Gemini models.
Environment Variables Configuration
Set these environment variables to configure Gemini CLI to use FizzlyCode. Note: Use the same API key format (cr_xxx) that you use for other tools.
# Gemini CLI Configuration
export CODE_ASSIST_ENDPOINT="https://fizzlycode.com/gemini"
export GOOGLE_CLOUD_ACCESS_TOKEN="cr_your_api_key_here"
export GOOGLE_GENAI_USE_GCA="true"
# Add to your shell profile (.bashrc, .zshrc, etc.)
echo 'export CODE_ASSIST_ENDPOINT="https://fizzlycode.com/gemini"' >> ~/.bashrc
echo 'export GOOGLE_CLOUD_ACCESS_TOKEN="cr_your_api_key_here"' >> ~/.bashrc
echo 'export GOOGLE_GENAI_USE_GCA="true"' >> ~/.bashrc
source ~/.bashrc
# For Windows PowerShell
$env:CODE_ASSIST_ENDPOINT = "https://fizzlycode.com/gemini"
$env:GOOGLE_CLOUD_ACCESS_TOKEN = "cr_your_api_key_here"
$env:GOOGLE_GENAI_USE_GCA = "true"
🔧 Important: The endpoint URL must be exactly https://fizzlycode.com/gemini
(not /api/gemini). Use the same API key (cr_xxx) as for other tools.
Codex Integration (CLI & VSCode)
Complete guide for configuring Codex CLI and VSCode extension with FizzlyCode. Codex is a powerful AI coding assistant that brings advanced reasoning capabilities directly to your development environment.
Important: FizzlyCode provides full Codex support including the latest gpt-5-codex model with enhanced reasoning capabilities. Your FizzlyCode API key works seamlessly with Codex.
Quick Start
Get Started in 3 Steps
- 1.
Get your API key from your FizzlyCode Dashboard
Your API key starts with
cr_
- 2.
Install Codex CLI:
npm install -g @openai/codex
- 3.
Configure with your FizzlyCode API key (see detailed steps below)
Part 1: Codex CLI Configuration
System Requirements
Environment:
- ✓Node.js 22+ (required)
- ✓npm 10+ (required)
- ✓Network connection
Supported Platforms:
- •Windows 10/11
- •macOS 11.0+
- •Linux (Ubuntu 20.04+)
1Install Codex CLI
Install Codex globally using npm:
# Install Codex CLI
npm install -g @openai/codex
# For macOS users with Homebrew
brew install codex
# Verify installation
codex --version
# Should show: codex-cli 0.31.0 or higher
# If you get "command not found", add npm global bin to PATH
export PATH=$(npm config get prefix)/bin:$PATH
Note: If you encounter permission issues, configure npm to use a user-level installation directory instead of sudo.
2Configure config.toml
Create the configuration directory and file:
File location:
- Windows:
C:\Users\[username]\.codex\config.toml
- macOS/Linux:
~/.codex/config.toml
First create the directory: mkdir -p ~/.codex
Then create the config.toml file with this content:
model_provider = "fizzlycode"
model = "gpt-5" # Can be changed to "gpt-5-codex" for enhanced reasoning
model_reasoning_effort = "high"
disable_response_storage = true
[model_providers.fizzlycode]
name = "fizzlycode"
base_url = "https://fizzlycode.com/openai"
wire_api = "responses"
requires_openai_auth = true # IMPORTANT: Add this for model switching support
• model: "gpt-5" for standard, "gpt-5-codex" for enhanced reasoning
• model_reasoning_effort: "high" for complex tasks, "medium" or "low" for simpler queries
• requires_openai_auth: MUST be true for model switching to work
• base_url: FizzlyCode's OpenAI-compatible endpoint
3Configure Authentication
Create the authentication file with your FizzlyCode API key:
File location: ~/.codex/auth.json
Create the auth.json file with this content:
{
"OPENAI_API_KEY": "cr_your_fizzlycode_api_key_here"
}
Important: Replace cr_your_fizzlycode_api_key_here
with your actual API key from the dashboard.
After creating the file, set secure permissions: chmod 600 ~/.codex/auth.json
Security Notice: Never share your API key. Restart your terminal after configuration changes.
4Test Configuration
Navigate to your project directory and test Codex:
# Start Codex
codex
# Test with a simple request
codex "Write a hello world function in Python"
# Test with reasoning effort levels
codex --reasoning-effort high "Explain the time complexity of quicksort"
Part 2: VSCode Extension Configuration
Install Official Codex Extension
- 1.
Open Extensions in VSCode:
Ctrl+Shift+X
(Windows/Linux) orCmd+Shift+X
(macOS) - 2.
Search for "Codex" or "ChatGPT"
Important: Only install the official extension with the OpenAI verification badge.
- 3.
Install the extension - it will appear in your sidebar
Enable Model Switching in VSCode
To enable the model selection dropdown in the VSCode extension, you MUST add this line to your config:
# ~/.codex/config.toml
[model_providers.fizzlycode]
requires_openai_auth = true # Required to enable the model dropdown
After adding this line: The extension exposes a model dropdown where you can select gpt-5 or gpt-5-codex and adjust reasoning effort levels.
Enable gpt-5-codex Model
The gpt-5-codex model offers enhanced reasoning capabilities. Here's how to enable and use it:
- 1.
Update your config.toml to use gpt-5-codex:
Enable gpt-5-codextomlmodel = "gpt-5-codex" # Enhanced reasoning model model_reasoning_effort = "high" # Use high for best performance
- 2.
Restart VSCode to apply changes
- 3.
In the extension, use the /model command to switch between models
Model Comparison:
- • gpt-5: Standard model, fast responses, great for most coding tasks
- • gpt-5-codex: Enhanced reasoning, deeper analysis, best for complex problems
Essential Slash Commands
Built-in Commands
/mode
Toggle approval mode (Suggest/Auto Edit/Full Auto)/model
Switch between gpt-5 and gpt-5-codex models/reasoning
Adjust reasoning effort (low/medium/high)/approvals
Toggle approval requirements/init
Initialize AGENTS.md for custom prompts/status
Show current configuration and usage/diff
Display Git differences/clear
Clear conversation historyTroubleshooting Common Issues
Error 401: Authentication Failed
Check the following:
- Verify your API key starts with
cr_
- Ensure the base_url matches FizzlyCode endpoints
- Check for conflicting environment variables
- Confirm your subscription is active
Stream error: connection disconnected
Possible causes:
- Long reasoning process (>150 seconds may timeout)
- Network connectivity issues
- Rate limit exceeded - check your usage
VSCode extension can't find config files
Resolution steps:
- Ensure files are in the correct location:
~/.codex/
- Check file permissions (should be readable)
- Restart VSCode after creating config files
- Version 0.36.0+ automatically reads config files
Model dropdown not appearing in VSCode
Solution:
Add this to your config.toml under [model_providers.fizzlycode]:
requires_openai_auth = true
Then restart VSCode to see the model selection dropdown
gpt-5-codex file editing issues
When using gpt-5-codex, file edits are performed via command line which doesn't track history. For better file tracking, use the standard gpt-5 model for file modifications.
How to optimize for best performance?
Performance tips:
- Use
model_reasoning_effort = "low"
for simple tasks - Switch to gpt-5 (instead of gpt-5-codex) for faster responses
- Clear conversation history regularly with /clear
- Use specific, focused prompts rather than broad requests
Third-party Platform Integration:
FizzlyCode's Codex API is compatible with platforms like new-api and cherry. Use the endpoint: /v1/chat/completions
Model names: gpt-5
or gpt-5-codex
Rate Limits & Quotas
API usage is subject to rate limits and quotas based on your subscription plan. All plans include a daily spending limit to help you control costs.
Rate Limit Headers: Check the response headers for current usage:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1699564800
Error Handling
The API returns standard HTTP status codes and detailed error messages to help you debug issues.
200 OK
SuccessRequest successful
400 Bad Request
Client ErrorInvalid request parameters
401 Unauthorized
Auth ErrorInvalid or missing API key
429 Too Many Requests
Rate LimitRate limit exceeded, retry after cooldown
500 Internal Server Error
Server ErrorServer error, please retry or contact support
Error Response Format
{
"error": {
"message": "Invalid API key provided",
"type": "authentication_error",
"code": "invalid_api_key"
}
}
Frequently Asked Questions
Can I use FizzlyCode with existing OpenAI/Anthropic code?
Yes! FizzlyCode is compatible with OpenAI and Anthropic API formats. Simply change your base URL to our endpoint and use your FizzlyCode API key.
How do I monitor my API usage?
Check your dashboard for real-time usage statistics, or use the /usage endpoint to programmatically retrieve your current usage and remaining quota.
What models are available?
We support all latest Claude models including Claude 3.5 Sonnet (claude-3-5-sonnet-20241022), Claude 3 Opus, and Claude 3 Haiku. Check the /models endpoint for the complete list.
What's the difference between streaming and non-streaming responses?
Streaming returns responses in real-time as they're generated (SSE format), while non-streaming waits for the complete response. Streaming is better for user-facing applications.
Can I use multiple API keys for the same account?
Yes, you can create multiple API keys for different applications or environments. This helps with usage tracking and security management.
How do I switch between models?
Simply change the "model" parameter in your API request. Use claude-3-5-sonnet-20241022 for the best performance, claude-3-opus-20240229 for complex tasks, or claude-3-haiku-20240307 for faster, cost-effective responses.
Is there a free tier available?
Yes! Our Free Forever plan includes 10 requests per minute with a $5 daily spending limit, perfect for trying out the service or light personal use.
How do I handle rate limit errors?
Implement exponential backoff with retry logic. Check the X-RateLimit-Reset header to know when your limit resets. Consider upgrading your plan if you frequently hit rate limits.
Need Help?
Our support team is here to help you get the most out of FizzlyCode.