API Documentation

Doggie Gateway provides an OpenAI-compatible API. Use any OpenAI client library by changing the base URL.

Quick Start

1

Get your API key

Sign up and create an API key in Dashboard → API Keys

2

Top up your balance

Add funds in Dashboard → Top Up

3

Choose a model

Browse available models and their IDs on the Models page

4

Make API calls

Use the base URL and model ID below in your code or app

Base URL

https://api.doggiegateway.com/v1

Authentication

Pass your API key in the Authorization header:

Authorization: Bearer dg-your-api-key

Model IDs

Use the full model ID format: provider/model-name

// Examples:
"openai/gpt-4.1"
"openai/gpt-4.1-mini"
"anthropic/claude-sonnet-4"
"google/gemini-2.5-pro-preview"
"deepseek/deepseek-r1"
"meta-llama/llama-4-maverick"

See the full list on the Models page.

Code Examples

Python (OpenAI SDK)

from openai import OpenAI

client = OpenAI(
    api_key="dg-your-api-key",
    base_url="https://api.doggiegateway.com/v1"
)

response = client.chat.completions.create(
    model="openai/gpt-4.1-mini",
    messages=[{"role": "user", "content": "Hello!"}]
)

print(response.choices[0].message.content)

Node.js (OpenAI SDK)

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "dg-your-api-key",
  baseURL: "https://api.doggiegateway.com/v1",
});

const response = await client.chat.completions.create({
  model: "openai/gpt-4.1-mini",
  messages: [{ role: "user", content: "Hello!" }],
});

console.log(response.choices[0].message.content);

cURL

curl https://api.doggiegateway.com/v1/chat/completions \
  -H "Authorization: Bearer dg-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4.1-mini",
    "messages": [{ "role": "user", "content": "Hello!" }]
  }'

Streaming

curl https://api.doggiegateway.com/v1/chat/completions \
  -H "Authorization: Bearer dg-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4.1-mini",
    "messages": [{ "role": "user", "content": "Hello!" }],
    "stream": true
  }'

Use with Third-party Apps

Doggie Gateway works with any OpenAI-compatible app. Just change the base URL and API key:

ChatGPT-Next-Web

Settings → Endpoint → Custom

LobeChat

Settings → Language Model → OpenAI Compatible

Open WebUI

Settings → Connections → OpenAI API

ChatBox

Settings → Model Provider → OpenAI API

For all apps, set the base URL to https://api.doggiegateway.com/v1 and use your Doggie Gateway API key.

Error Codes

CodeDescription
401Invalid or missing API key
402Insufficient balance — top up in your dashboard
500Internal server error