Docs

Quick start, editor setup and FAQ for the OpenAI-compatible API.

Codex

Overview

OpenAI's terminal agent. It talks the OpenAI API natively, so Peris.ai Router is a drop-in.

You need a Peris.ai Router API key (perisai_router_sk_...) from the console (API keys > Create key), and the base URL https://<your-host>/v1.

Installation

  1. npm install -g @openai/codex

Configure Peris.ai Router

~/.codex/config.toml:

model = "perisairouter/smart"
model_provider = "perisai_router"

[model_providers.perisai_router]
name = "Peris.ai Router"
base_url = "https://<your-host>/v1"
env_key = "PERISAI_ROUTER_API_KEY"
wire_api = "chat"

Then export PERISAI_ROUTER_API_KEY=perisai_router_sk_....

Quick start (up and running in 5 minutes)

  1. Write the config, export the key.
  2. Run codex in a project.
  3. Ask "Siapa kamu?" to verify.

FAQ

  • 404 / timeout? The base URL is missing /v1 or has an extra /chat/completions. Use exactly https://<your-host>/v1.
  • Model not found? Model ids are case-sensitive and must match the console Models page, e.g. perisairouter/smart or deepseek/deepseek-v4-flash.
  • 401? The key is wrong, disabled or expired. 402? Your organization balance is Rp 0; see Credits.
  • 403 model_not_allowed? The key's guardrails block that model. Ask your workspace Admin or pick another model.