Skip to content

Quick Start

Getting a working GodeX gateway takes less than five minutes. This guide walks through installation, interactive configuration via the godex init wizard, launching the server, and sending your first Responses API request. By the end you will have a running gateway that translates OpenAI Responses API calls into Chat Completions requests for any built-in provider.

Prerequisites

RequirementMinimum Version
Bun>= 1.0 (for development)
Node.js>= 18 (for npm install only)
Provider API keyAt least one of DeepSeek, Zhipu, or MiniMax

At a Glance

StepCommandWhat It Does
1. Installnpm install -g @ahoo-wang/godexInstalls the native binary
2. Configuregodex initInteractive wizard generates godex.yaml
3. Rungodex serveStarts the HTTP gateway
4. Testcurl localhost:5678/healthVerifies the server is healthy
5. Callcurl -X POST localhost:5678/v1/responsesSends your first API request

Step 1 -- Install GodeX

GodeX ships as a standalone native binary. The npm package's postinstall script automatically selects the correct platform binary.

bash
npm install -g @ahoo-wang/godex

Alternatively, install with Homebrew or download the binary directly from GitHub Releases. See Installation & Setup for all installation methods.

Step 2 -- Create Configuration

Run the interactive init wizard. It prompts for provider selection, API keys, session backend, and logging level, then writes a complete godex.yaml (src/cli/init/run.ts:8-22).

bash
godex init

The wizard uses @clack/prompts to collect:

PromptDescriptionDefault
Default providerWhich provider to use when model is ambiguousdeepseek
API keyBearer token for each selected provider(from env)
Base URLOverride endpoint for each providerProvider default
Session backendmemory or sqlitememory
Log leveltrace, debug, info, warn, errorinfo
PortServer listen port5678
Config pathWhere to write godex.yaml./godex.yaml

The resulting godex.yaml will look similar to this (API keys rendered as environment variable references):

yaml
server:
  port: 5678
default_provider: deepseek
providers:
  deepseek:
    spec: deepseek
    credentials:
      api_key: ${DEEPSEEK_API_KEY}
    endpoint:
      base_url: https://api.deepseek.com
  zhipu:
    spec: zhipu
    credentials:
      api_key: ${ZHIPU_API_KEY}
    endpoint:
      base_url: https://open.bigmodel.cn/api/coding/paas/v4
session:
  backend: sqlite
  sqlite:
    path: ./data/sessions.db
logging:
  level: info

The YAML builder assembles this structure in src/cli/init/config-yaml.ts:6-53, setting file permissions to 0600 to protect API keys.

Step 3 -- Start the Server

bash
# Set your API key(s) in the environment
export DEEPSEEK_API_KEY=sk-your-key-here

# Start the gateway
godex serve

The serve command loads the configuration, registers built-in providers, creates the ApplicationContext, and starts Bun's HTTP server (src/cli/serve.ts:12-47).

Common CLI overrides:

FlagExampleEffect
--portgodex serve --port 8080Override listen port
--hostgodex serve --host 127.0.0.1Override listen address
--configgodex serve --config /etc/godex/godex.yamlUse alternate config path
--log-levelgodex serve --log-level debugOverride log level

Step 4 -- Verify the Server

bash
curl http://localhost:5678/health

Expected response:

json
{"status":"ok","providers":["deepseek","zhipu","minimax"],"unsupported_providers":[]}

The health route is registered in src/server/server.ts:22-23.

Step 5 -- Make Your First API Call

bash
curl -X POST http://localhost:5678/v1/responses \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek/deepseek-v4-pro",
    "input": "Explain the bridge pattern in two sentences."
  }'

The server routes the request through the full bridge pipeline:

You can also stream the response by adding "stream": true to the request body.

Next Steps

TopicDescription
ConfigurationFull godex.yaml reference with all sections
Built-in ProvidersCompare DeepSeek, Zhipu, and MiniMax capabilities
Installation & SetupDocker, build from source, and platform binaries

References