Crazyrouter API Document
🇺🇸 English
  • 中文
  • 🇺🇸 English
  1. Plugins/Software Usage Tutorials
Crazyrouter API Document
🇺🇸 English
  • 中文
  • 🇺🇸 English
  • 默认模块
    • CrazyRouter Overview
      • Introduction
      • API request
      • API Quick Start Guide
      • API Endpoint
      • Contact us
    • Chat
      • ChatGPT
        • ChatGPT Audio
          • GPT-4o-audio
          • whisper-1
          • gpt-4o-transcribe
          • gpt-4o-mini-tts
          • translations
        • ChatGPT Chat
          • Chat Completion Object
          • Chat Completion Chunk Object
          • Create Chat Completion (Streaming)
          • Create Chat Completion (Non-Streaming)
          • Create Chat Vision (Streaming)
          • Create Chat Vision (Streaming) base64
          • Create Chat Vision (Non-Streaming)
          • Create Chat Image Generation (Non-Streaming)
          • Function calling
          • Official N Test
          • Create Chat Function Call
          • Create Structured Output
          • Control Reasoning Model Effort Level
          • Create Chat Completion qwen-mt-turbo
          • Create Chat Completion DeepSeek V3.1 Thinking Level (Streaming)
          • DeepSeek OCR Recognition
        • ChatGPT(Completions)
          • Completion Object
          • Create Completion
        • ChatGPT(Embeddings)
          • Embedding Object
          • Create Embedding
        • Web Search
          • web search
      • Anthropic Claude
        • Chat Completion Object
        • Chat Completion Chunk Object
        • Create Chat Completion (Streaming) [Native Format]
        • Create Function Call (Streaming) [Native Format]
        • Create Thinking Chat [Native Format]
        • Create Thinking Chat
        • Create Chat Completion (Streaming)
        • Create Chat Completion (Non-Streaming)
        • Create Chat Vision (Streaming)
        • Create Chat Vision (Non-Streaming)
        • PDF Support [Native Format]
        • PDF Support [Native Format] Base64 Format
      • Google Gemini
        • Gemini Native Format
          • Text Generation
          • Text Generation Streaming
          • Text Generation Thingking+streaming
          • Image Generation
          • Image Generation gemini-2.5-flash-image
          • Image Generation gemini-2.5-flash-image Control Aspect Ratio
          • Image Generation gemini-2.5-flash-image Control Aspect Ratio +imageSize
          • Image Editing
          • Image Understanding
          • Formatted Output
          • Function Call
          • Document Understanding
          • URL context
          • Code Execution
          • google search
          • Video Understanding
          • URL context
          • Video Understanding-url Native Format
          • Imagen 4
          • Audio Understanding
          • Embeddings
          • Text Generation gemini-3-pro-preview:generateContent
        • chat Compatible Format
          • Gemini Image Generation API [Chat Compatible Format]
          • Chat API [Chat Compatible Format]
          • Chat API - Thinking 1 [Chat Compatible Format]
          • Chat API - Thinking 2 [Chat Compatible Format]
          • Vision API [Chat Compatible Format]
          • Chat + File Reading API [Chat Compatible Format]
    • Chat (Responses)
      • Responses API VS Chat API
      • Create Model Response
      • Create Function Calling
      • Create Model Response (Streaming)
      • Create Model Response (Control Thinking Length)
      • web search
      • Create Model Response (GPT-5 Enable Thinking)
      • Create Function Calling
    • Image Generation Models
      • README
      • Image Object
      • Midjourney
        • upload image
        • upload Imagine task
        • Query Task Status by Task ID
        • Query Tasks by ID List
        • Get Task Image Seed
        • Execute Action
        • Submit Blend Task
        • Sumit Describe task
        • Sumit Modal
      • Ideogram
        • Generate 3.0(text2image)Generate
        • Generate 3.0(imag editing)Edit
        • Generate 3.0 (Image Remake) Remix
        • Generate 3.0(图片重构)Reframe
        • Generate 3.0(替换背景) Replace Background
        • ideogram(文生图)
        • Remix(混合图)
        • Upscale(放大高清)
        • Describe(描述)
      • GPT Image-1
        • 创建 gpt-image-1
        • 编辑 gpt-image-1
        • 蒙版 gpt-image-1
      • 即梦绘画
        • 创建绘画
        • 编辑图片
      • DALL·E 3
        • 创建 DALL·E 3
      • FLUX 系列
        • gpt 兼容格式
          • Flux 创建(OpenAI dall-e-3格式)
          • Flux编辑(OpenAI dall-e-3格式)
        • Replicate 官方格式
          • Flux 分辨率
          • 接入教程
          • 创建任务 black-forest-labs/flux-kontext-dev
          • 查询任务
      • 豆包系列
        • doubao-seedream-3-0-t2i-250415
        • doubao-seededit-3-0-i2i-250628
        • doubao-seedream-4-0-250828-文生图
        • doubao-seedream-4-0-250828-图生图
        • doubao-seedream-4-0-250828-多图生图
        • doubao-seedream-4-5-251128 文生图(纯文本输入单图输出)
        • doubao-seedream-4-5-251128 图文生图(单图输入单图输出)
        • doubao-seedream-4-5-251128 多图融合(多图输入单图输出)
        • doubao-seedream-4-5-251128 组图输出(多图输出)
        • doubao-seedream-4-5-251128 单张图生组图
        • doubao-seedream-4-5-251128 多参考图生组图
      • Fal.ai平台
        • 状态码
        • 获取请求结果
        • /fal-ai/nano-banana 文生图
        • /fal-ai/nano-banana/edit 图片编辑
      • 千问 Qwen-Image 系列
        • qwen-image-edit-2509
    • 视频模型
      • veo 视频生成
        • 视频统一格式
          • 状态码
          • 创建视频
          • 创建视频,带图片
          • 查询任务
          • 创建视频(参考图)
        • OpenAI 视频格式
          • openai 创建视频,带图片
          • openai 查询任务
          • openai 下载视频
      • luma 视频生成
        • 官方API格式
          • 状态码
          • 提交生成视频任务
          • 扩展视频
        • 查询任务
          • 查询单个任务
          • 批量获取任务
      • Kling 快手可灵
        • Callback协议
        • 图像生成
        • 文生视频
        • 图生视频
        • 查询任务(免费)
        • 多图参考生视频
        • 虚拟试穿
        • 对口型
        • 视频延长
        • 视频特效
      • Runway 视频生成
        • 状态码
        • 提交视频生成任务
        • 查询视频任务(免费)
      • 即梦 视频生成
        • 状态码
        • 视频统一格式
          • 创建视频
          • 查询任务
        • 官方格式
          • 添加中
        • 提交视频生成任务
        • 查询视频任务(免费)
      • 海螺 视频生成
        • 状态码
        • 提交视频生成任务
        • 视频任务状态查询
        • 图生视频
        • 首尾帧视频
      • 豆包 视频生成
        • 文生视频示例
        • 图生视频-首帧
        • seedance-lite-首尾帧
        • 图生视频-base64编码
        • seedance-lite-参考图
        • 查询单个任务
        • 查询视频生成任务列表-默认
        • 查询视频生成任务列表-搜索多个任务 ID
      • sora 视频生成
        • 统一视频格式
          • 查询任务
          • 创建视频,带图片 sora-2
          • 创建视频 sora-2
          • 创建视频 sora-2-pro
          • 创建视频 (带 Character)
        • chat格式
          • 创建视频
          • 创建视频, 带图片
          • 连续修改生成视频
        • OpenAI官方视频格式
          • openai 查询任务
          • openai 下载视频
          • openai 创建视频,带图片
          • 使用故事板创建视频
          • openai 创建视频,带图片 私有模式
          • openai 创建视频(带Character)
          • openai 编辑视频
        • 创建角色
      • grok 视频生成
        • 视频统一格式
          • 创建视频
          • 查询任务
      • 通义万象 视频生成
        • 生成视频
        • 视频查询
    • GPTs 相关
      • 简介
      • GPTs对话
    • 系统API
      • 获取令牌列表
      • 列出模型
      • 新增令牌
      • 获取令牌支持模型
      • 获取账号信息
      • 修改令牌
      • 搜索令牌
      • 删除令牌
    • 文生音乐 Suno
      • 参数
      • 说明
      • 任务提交
        • 生成歌曲(灵感模式)
        • 生成歌曲(自定义模式)
        • 生成歌曲(续写模式)
        • 生成歌曲(歌手风格)
        • 生成歌曲(上传歌曲二次创作)
        • 生成歌曲(拼接歌曲)
        • 生成歌词
        • 歌曲拼接
      • 查询接口
        • 批量获取任务
        • 查询单个任务
        • 获取wav
    • Python配置方式
      • python 使用 语音转文本
      • python 使用文本转语音
      • python 使用Embeddings 向量化
      • python 调用DALL·E
      • python简单调用 openai function-calling demo
      • python 简单langchain 调用openai demo
      • python llama_index 配置
      • Python基础对话
      • Python使用gpt-4o识别图片-本地图片
      • Python使用gpt-4o识别图片
      • Python使用Claude识别图片
      • python 库流式输出
      • gpt realtime模型调用
      • python request 请求 流式输出demo
      • python 使用gpt-image-1 创建编辑图片
      • python openai官方库(使用AutoGPT,langchain等)
      • python 连续对话
    • Rerank 重排序模型
      • 重排序
    • PHP
      • PHP Image Editing Demo
    • nodejs
      • Node.js Audio Transcription Demo
    • Plugins/Software Usage Tutorials
      • Codex
      • N8N
      • Gemini CLI
      • Claude Code Installation and Usage Guide
      • CherryStudio Configuration Guide
      • dify Configuration Guide
      • cline
      • aider
      • Cursor
      • lobechat
      • ChatBox
      • gpt_academic
      • nextchat
      • zotero gpt
      • CLAUDE DEV
      • ChatGPT Sidebar
      • chatgpt-on-wechat
      • chatgpt GPT Academic
      • RikkaHub
      • Coze Workflow Configuration Guide
    • Help Center
      • Thinking Model Response Format
      • HTTP Status Codes
      • Image Upload API Documentation
      • Image upload API
  • Unified Video API
    • Unified Video
      • 创建视频 (Unified Video)
      • 查询任务 (Unified Video)
  1. Plugins/Software Usage Tutorials

Codex

Codex Installation and Configuration Guide#


Windows Tutorial#

System Requirements#

Windows 10 or Windows 11
Node.js 22+
npm 10+
Network connection

Installation Steps#

Prerequisites!!!
Install Git Bash by visiting Git - Downloads to download the version for your system, then click "Next" through the installation process.
1. Install Node.js
Visit the Node.js Official Website to download and install the latest LTS version.
2. Install codex
Open Command Prompt (CMD) or PowerShell, and run:
3. Verify Installation
Open Command Prompt (CMD) or PowerShell, and run:

Configure API#

1. Obtain Auth Token
Visit the Crazyrouter website and perform the following:
Click Console → API Tokens page
Click Add Token
Token group
Token name: Any name you prefer
Quota recommendation: Set to Unlimited
Keep other options as default
image.png
2. Configuration Files
Important: Replace sk-xxx below with your actual API key generated from Crazyrouter!
Important: Replace sk-xxx below with your actual API key generated from Crazyrouter!
Important: Replace sk-xxx below with your actual API key generated from Crazyrouter!
1.
Navigate to the .codex folder in your user directory, e.g., C:\Users\testuser\.codex.
(Note: If you cannot see this directory, you haven't enabled "Show hidden items" in Windows. Please enable it in File Explorer first.)
image.png
2.
If the .codex folder doesn't exist, manually create it, then create two files inside: config.toml and auth.json.
image.png
3. Fill in the configuration (replace sk-xxx with your actual SK).
a. Configuration in auth.json:
{"OPENAI_API_KEY": "sk-xxx"}
b. Configuration in config.toml (just paste the content below):
model_reasoning_effort options are high, medium, low, representing the model's thinking effort level.
model_provider = "api111"
model = "gpt-5-codex"
model_reasoning_effort = "high"
disable_response_storage = true
preferred_auth_method = "apikey"

[model_providers.api111]
name = "api111"
base_url = "https://crazyrouter.com/v1"
wire_api = "responses"

Launch codex#

Restart your terminal! Restart your terminal! Restart your terminal!
Then navigate to your project directory:
Run the following command to start:
image.png

VSCode codex Extension#

After completing the above configuration, search for and install codex in the VSCode Extension Marketplace.
image.png
Once installed, it will appear in the sidebar.

image.png#

Mac Tutorial#

System Requirements#

macOS 12 or higher
Node.js 22+
npm 10+
Network connection

Installation Steps#

1. Install Node.js
Option 1: Visit the Node.js Official Website to download and install the latest LTS version.
Option 2: Use Homebrew (Recommended)
2. Install codex
Open Terminal and run (may require sudo):
3. Verify Installation
Open Terminal and run:

Configure API#

1. Obtain Auth Token
Visit the Crazyrouter website and perform the following:
Click Console → API Tokens page
Click Add Token
Token group: Select codex-special (you must select this group, otherwise it won't work)
Token name: Any name you prefer
Quota recommendation: Set to Unlimited
Keep other options as default
image.png
2. Configuration Files
Important: Replace sk-xxx below with your actual API key generated from Crazyrouter!
Important: Replace sk-xxx below with your actual API key generated from Crazyrouter!
Important: Replace sk-xxx below with your actual API key generated from Crazyrouter!
1.
Create directory and files:
2.
Edit the auth.json file:
Press i to enter insert mode, paste the following content (replace sk-xxx with your key), then press ESC, type :wq and press Enter to save and exit.
{"OPENAI_API_KEY": "sk-xxx"}
3.
Edit the config.toml file:
Press i to enter insert mode, paste the following content, then press ESC, type :wq and press Enter to save and exit.
model_provider = "api111"
model = "gpt-5-codex"
model_reasoning_effort = "high"
disable_response_storage = true
preferred_auth_method = "apikey"

[model_providers.api111]
name = "api111"
base_url = "https://crazyrouter.com/v1"
wire_api = "responses"

Launch codex#

Restart your terminal! Restart your terminal! Restart your terminal!
Then navigate to your project directory:
Run the following command to start:
[Image]

VSCode codex Extension#

After completing the above configuration, search for and install codex in the VSCode Extension Marketplace.
[Image]
Once installed, it will appear in the sidebar.
[Image]

Linux Tutorial#

System Requirements#

Major Linux distributions (Ubuntu 20.04+, Debian 10+, CentOS 7+, etc.)
Node.js 22+
npm 10+
Network connection

Installation Steps#

1. Install Node.js
Ubuntu/Debian
CentOS/RHEL/Fedora
Arch Linux
2. Install codex
Open Terminal and run:
3. Verify Installation
Open Terminal and run:

Configure API#

1. Obtain Auth Token
Visit the Crazyrouter website and perform the following:
Click Console → API Tokens page
Click Add Token
Token group: Select codex-channel-gpt (you must select this group, otherwise it won't work)
Token name: Any name you prefer
Quota recommendation: Set to Unlimited
Keep other options as default
[Image]
2. Configuration Files
Important: Replace sk-xxx below with your actual API key generated from Crazyrouter!
Important: Replace sk-xxx below with your actual API key generated from Crazyrouter!
Important: Replace sk-xxx below with your actual API key generated from Crazyrouter!
1.
Create directory and files:
2.
Edit the auth.json file:
Press i to enter insert mode, paste the following content (replace sk-xxx with your key), then press ESC, type :wq and press Enter to save and exit.
{"OPENAI_API_KEY": "sk-xxx"}
3.
Edit the config.toml file:
Press i to enter insert mode, paste the following content, then press ESC, type :wq and press Enter to save and exit.
model_provider = "api111"
model = "gpt-5-codex"
model_reasoning_effort = "high"
disable_response_storage = true
preferred_auth_method = "apikey"

[model_providers.api111]
name = "api111"
base_url = "https://crazyrouter.com/v1"
wire_api = "responses"

Launch codex#

Restart your terminal! Restart your terminal! Restart your terminal!
Then navigate to your project directory:
Run the following command to start:
image.png

VSCode codex Extension#

After completing the above configuration, search for and install codex in the VSCode Extension Marketplace.
image.png
Once installed, it will appear in the sidebar.

image.png#

FAQ#

If you encounter errors, troubleshoot with the following steps:
1.
Confirm the API Key was created correctly: Set quota to Unlimited, don't restrict models, and select codex-channel-gpt as the group.
For more codex configuration and usage details, please refer to the official codex tutorial.
Modified at 2026-01-28 02:38:03
Previous
Node.js Audio Transcription Demo
Next
N8N
Built with