Skip to main content

Overview

FoxAPI provides a unified API gateway compatible with OpenAI standards. You can integrate with any AI model through a single API key and base URL.
Base URL: https://api.foxapi.cc

Step 1: Get Your API Key

  1. Log in to the FoxAPI Dashboard
  2. Navigate to API Keys section
  3. Click “Create New Key”
  4. Copy the generated key (starts with sk-)
Keep your API key secure. Never expose it in client-side code or public repositories.

Step 2: Make Your First Request

curl --request POST \
  --url https://api.foxapi.cc/v1/images/generations \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gemini-3.1-flash-image-preview",
    "prompt": "A cat playing in the grass"
  }'

Step 3: Query Task Result

Most generation APIs use asynchronous processing. Use the returned task ID to check the result:
curl --request GET \
  --url https://api.foxapi.cc/v1/tasks/YOUR_TASK_ID \
  --header 'Authorization: Bearer YOUR_API_KEY'
When status changes to completed, the output field will contain your generated content.

Step 4: Use with Text Models

FoxAPI is fully compatible with OpenAI’s Chat Completions API:
curl --request POST \
  --url https://api.foxapi.cc/v1/chat/completions \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "claude-sonnet-4-6",
    "messages": [
      {"role": "user", "content": "Hello, who are you?"}
    ]
  }'

Authentication

All APIs require Bearer Token authentication. Add this header to every request:
Authorization: Bearer YOUR_API_KEY

What’s Next?

API Manual

Explore all available API endpoints

Integration Guide

Connect Claude Code CLI and other tools