gpubox.ai

Quickstart

Your first call in 60 seconds.

GPUBox is OpenAI-compatible. Any OpenAI SDK works without modification — just point it at https://api.gpubox.ai/v1 and use a GPUBox API key.

  1. Step 1

    Create an API key

    Sign up for GPUBox and create a key from your dashboard. Keys start with gpb_.

    Sign up
  2. Step 2

    Make your first call

    Pick your language. The API surface is identical to OpenAI's — only the base_url changes.

    Python — pip install openai
    from openai import OpenAI
    
    client = OpenAI(
        api_key="gpb_...",
        base_url="https://api.gpubox.ai/v1",
    )
    
    response = client.chat.completions.create(
        model="qwen2.5-32b-instruct",
        messages=[{"role": "user", "content": "Hello, GPUBox!"}],
    )
    print(response.choices[0].message.content)
    Node.js — npm install openai
    import OpenAI from "openai";
    
    const client = new OpenAI({
      apiKey: "gpb_...",
      baseURL: "https://api.gpubox.ai/v1",
    });
    
    const response = await client.chat.completions.create({
      model: "qwen2.5-32b-instruct",
      messages: [{ role: "user", content: "Hello, GPUBox!" }],
    });
    
    console.log(response.choices[0].message.content);
    curl
    curl https://api.gpubox.ai/v1/chat/completions \
      -H "Authorization: Bearer gpb_..." \
      -H "Content-Type: application/json" \
      -d '{
        "model": "qwen2.5-32b-instruct",
        "messages": [{"role": "user", "content": "Hello, GPUBox!"}]
      }'
  3. Step 3

    Stream tokens as they arrive

    For chat-like UX, set stream=True. GPUBox emits standard OpenAI SSE chunks.

    Python — streaming
    for chunk in client.chat.completions.create(
        model="qwen2.5-32b-instruct",
        messages=[{"role": "user", "content": "Stream a haiku."}],
        stream=True,
    ):
        if chunk.choices[0].delta.content:
            print(chunk.choices[0].delta.content, end="", flush=True)
  4. Step 4

    Transcribe audio

    Whisper-large-v3-turbo runs on the same key. Multipart upload, OpenAI-shape response.

    Python — transcription
    with open("audio.wav", "rb") as f:
        transcript = client.audio.transcriptions.create(
            model="whisper-large-v3-turbo",
            file=f,
        )
    print(transcript.text)

What's next