Skip to main content

Overview

Crazyrouter supports calling OpenAI GPTs (custom GPT applications) through the standard Chat Completions API. Simply set the model name to the GPTs-specific format.

Model Name Format

gpt-4-gizmo-{gizmo_id}
The gizmo_id is the unique identifier for the GPT, which can be extracted from the GPTs URL.

Getting the Gizmo ID

  1. Visit the ChatGPT GPTs Store
  2. Open the target GPT application
  3. Extract the ID from the URL: https://chatgpt.com/g/g-B3hgivKK9-xxx → ID is g-B3hgivKK9

Code Examples

from openai import OpenAI

client = OpenAI(
    api_key="sk-xxx",
    base_url="https://crazyrouter.com/v1"
)

# Chat with a GPT
response = client.chat.completions.create(
    model="gpt-4-gizmo-g-B3hgivKK9",
    messages=[
        {"role": "user", "content": "Hello, please introduce yourself"}
    ]
)

print(response.choices[0].message.content)
GPTs calls require upstream channel support. Not all GPTs are available - availability depends on channel configuration.
GPTs conversations support streaming output by setting stream: true. Billing is calculated based on GPT-4 model pricing.