Space Router · Setup Guideline
On this page
  1. Before you start
  2. 1 · One-click installation
    1. Desktop app (optional)
  3. 2 · Create your API key
  4. 3 · Connect Space Router
    1. Terminal configuration
    2. Make the key available to the desktop app
  5. 4 · Verify a real response
  6. Troubleshooting
  7. Backup, update and recovery
  8. Official references

SPACE ROUTER · Grok

Grok + Space Router

Use your Space Router Grok group in Codex. This guide installs the client and configures the Grok route.

Before you start

FieldValueCheck
Supported setupWindows; macOS; uses the Codex clientChoose the matching OS installer; keep your current configuration backup
AccountA Space Router account and matching group credit/subscriptionThe app’s own login and the router API key are separate

Download stages are shown in the terminal. Direct downloads show a progress bar or received bytes; package managers use their own output. A percentage may be unavailable. Keep the terminal open until the final installation and connection results.

Space Router one-click scripts report INSTALLATION separately from CONNECTION. DONE means the app or command was checked; VERIFIED means the stated response test passed. SKIPPED / NOT CONFIGURED needs the connection steps. FAILED / INCOMPLETE needs the displayed error fixed. A CLI test does not verify a desktop app or editor panel.

Model examples and placeholders must be replaced with IDs allowed by your key’s group. You can install the app first, then create the key before the connection steps.

When this tool uses your Space Router endpoint and key, its model requests use your Space Router balance or eligible subscription. App sign-in, app subscriptions and cloud-only features are separate. Confirm the actual route in usage history after testing.

1 · One-click installation

There is no separate Grok desktop app in this flow: the installer prepares Codex and connects the Space Router Grok group. Use a Grok key, not a GPT key.

Windows

Open the PowerShell app: press the Windows key, type PowerShell, and open it. Copy the command below, paste it into PowerShell, then press Enter.

irm https://stationine.com/setup-grok.ps1 | iex

Open PowerShell from the Windows Start menu. Paste the command, press Enter, and leave the window open until it finishes.

macOS

Open the Terminal app: press Command + Space, type Terminal, and open it. Copy the command below, paste it into Terminal, then press Return.

bash -c 'script=$(curl -fL --progress-bar https://stationine.com/setup-grok.sh) && test -n "$script" && bash -c "$script"'

Open Terminal from Spotlight (Command + Space). Paste the command and press Return.

  1. Respond to the key prompts

    Paste your own purchased-group key when the installer asks. Press Enter to skip a group you did not buy. Test requests consume your account credit. Do not paste a customer or supplier administrator key.
  2. Reopen the terminal and confirm installation

    If a command is not found, close the terminal completely and open a new one so it reloads PATH. Then run the version check below. If installation failed, read the last error before rerunning; do not start several copies together.
codex --version

You should see the tool’s version output. A version check proves the executable is reachable; the provider test comes later.

Desktop app (optional)

The setup result reports CLI and desktop installation separately; an installed CLI alone does not prove the desktop app is installed. For a desktop interface, use the current official desktop download instructions. Install the Windows package, or move the Mac app into Applications as instructed. Then use the desktop credential steps below.

2 · Create your API key

  1. Sign in to Space Router

    Open space.stationine.com and sign in to your own account. Confirm you have usable credit or an eligible subscription before testing.
  2. Create a dedicated API key

    Open API Keys → Create API Key. Name the key after this tool. Select Grok; use the groups actually available to your account. A key for a different model family is not interchangeable.
  3. Copy the full key and the model ID

    Save the full key in your password manager. Copy one exact model ID allowed by that key’s group from Available Channels. Keep any limits or expiry you need. A model shown in an app’s public list may not belong to your key.
  4. Keep the key private

    Paste the key only into your own app or local credential store. Do not include it in shared screenshots, project files, import links or support messages. For two purchased groups, create two separate keys.
Space Router API key form; choose the matching group
The group is the part that determines model access. The current form may look different.

3 · Connect Space Router

Terminal configuration

After the one-command path, use the verified configuration it prints. The manual alternative below uses a private environment variable, so you do not need to overwrite an existing ChatGPT login file.

  1. Back up and open config.toml

    Windows: %USERPROFILE%\.codex\config.toml. macOS: ~/.codex/config.toml. Create the folder only if missing. Save a backup before editing; keep MCP, plugins, profiles and unrelated settings.
  2. Merge the provider block

    Keep the model and model_provider keys before the first TOML table. Do not add duplicate keys/tables. Replace the model placeholder with an exact ID allowed by your purchased group.
model = "YOUR_GROK_MODEL_ID"
model_provider = "space-router-grok"

[model_providers.space-router-grok]
name = "Space Router (Grok)"
base_url = "https://space.stationine.com/v1"
wire_api = "responses"
env_key = "SPACE_ROUTER_GROK_KEY"

For the first terminal test, set the credential privately in the same terminal that will start Codex. The examples below are placeholders; replace them only on your own device.

Windows

$env:SPACE_ROUTER_GROK_KEY = 'YOUR_GROUP_API_KEY'
codex

macOS

export SPACE_ROUTER_GROK_KEY='YOUR_GROUP_API_KEY'
codex

For a desktop app launched from the Dock/Start menu, a terminal-only variable may be absent. Use the one-command installer or CC Switch for private saved credentials, or your own credential delivery method. Fully quit/reopen the app and follow its own sign-in prompts. If a nonstandard model is rejected before a request, use the catalogue-aware installer rather than inventing model metadata.

Make the key available to the desktop app

Use the same user-level config.toml; provider settings in a project-local file are ignored. For manual env_key authentication, make the named variable available to the GUI process. The values below are placeholders for your own device.

Windows

[Environment]::SetEnvironmentVariable('SPACE_ROUTER_GROK_KEY', 'YOUR_GROUP_API_KEY', 'User')

This saves a user environment variable in plaintext. Use only on your own profile. Fully quit the app and reopen from a refreshed session; if it still inherits an old environment, sign out of Windows and back in after saving your work.

macOS

launchctl setenv SPACE_ROUTER_GROK_KEY 'YOUR_GROUP_API_KEY'

This makes the variable available to newly launched GUI apps in the current login session. It is cleared at logout/reboot. Set it again before reopening the app, or use an approved saved-credential method for lasting setup.

Fully quit the app, reopen it and create a fresh local task with Space Router selected. A retained ChatGPT login does not prove which provider serves this task. Cloud tasks and account features can follow separate routes.

4 · Verify a real response

Before sending the test, use /status in the CLI to confirm the configured provider and model; in desktop inspect the selected provider/model in the task. A saved account login alone does not prove routing.

  1. Reopen the client

    Save your settings, fully quit the app and reopen it. Start a new conversation. Select the Space Router provider and the exact model allowed by your key; do not leave the previous provider selected.
  2. Ask a small, checkable question

    Send What is 17 plus 25? Reply with just the number. Expect a complete reply of 42. This uses your account credit at the selected model’s normal rate. A speed check or HTTP 200 alone is not enough.
  3. Match the usage record

    Open Space Router’s usage history. Match the request time, model and API key with this test. A client reply plus the matching record is stronger evidence than an “installed” or “connected” label.

Before using the agent in a real project, create a scratch folder with a harmless README and ask it to read and summarize that file. Check the proposed tool action before allowing it. Model text output alone does not establish tool-calling support.

Troubleshooting

SymptomWhat to check
401 / 403Check the full key, its enabled/expiry/IP settings, and group permission. Re-paste privately; do not publish the key.
404 / model not foundMatch the API format, base URL and exact model ID. Do not add /v1 twice or enter a full request path into a base-URL field.
429 / credit or quota errorCheck account credit, key quota and rate/concurrency limits. Repeated retries do not add balance or remove a limit.
Timeout / incomplete replyCheck the network and channel status. Keep the time and request ID for support; do not treat a partially received reply as a successful test.
Still uses the previous providerReopen the client, start a new conversation, and check its selected provider and any environment/config overrides. Restore a backup instead of deleting the whole configuration.
Unrecognized Grok modelCheck the exact group ID and use the catalogue-aware installer. Do not silently replace it with a GPT model to make the test pass.

If you need help, send the app version, operating system, model ID, timestamp and request ID to Space Router support. Redact keys and private project content.

Backup, update and recovery

Before editing an existing setup, copy ~/.codex/config.toml and the installer’s printed backup directory to a private backup. Keep the original provider name and model selection so you can return to them. Do not put credential backups in a project repository.

To recover, close the client, restore the specific file or select the previous provider, then reopen it. Keep conversations and other unrelated settings. Revoke an exposed key in Space Router and create a replacement only if it was actually exposed.

Use the application’s normal update flow. Recheck the provider selection and one real response after an update; do not rerun several installers together when one is still active.

Official references