Knowledge base

Tìm nhanh trong tài liệu Zora

Responses API For Codex CLI

Use /v1/responses when configuring Codex CLI with Zora as a custom provider. Codex should talk to the public base URL https://api.zora.io.vn/v1, read the API key from ZORA_API_KEY, and use the responses wire API.

POST/v1/responses
Responses route for Codex CLI custom providers and direct Responses-compatible API calls.
Recommended beta default
Start one tester on gpt-5.5. Production is current production, so use exact model IDs fromGET /v1/models and use exact model IDs only.

Codex Config

The official Codex config supports a custom model_provider block withbase_url, env_key, and wire_api = "responses". Put this in~/.codex/config.toml.

~/.codex/config.toml
model_provider = "zora" model = "gpt-5.5" [model_providers.zora] name = "Zora" base_url = "https://api.zora.io.vn/v1" env_key = "ZORA_API_KEY" wire_api = "responses"

Smoke Test

Set the key only in the local shell or a user-approved secret manager. Do not paste the raw key into public chat, frontend code, or a repository.

401 checklist
Copy the full, unmasked key from Dashboard API Keys. Do not use placeholder text, a masked key with* characters, an older disabled key, or a value with extra spaces or quotes.
Windows PowerShell
$env:ZORA_API_KEY = "YOUR_ZORA_API_KEY" codex exec -m gpt-5.5 "Reply with exactly: ZORA_CODEX_OK"
macOS / Linux / Git Bash
export ZORA_API_KEY="YOUR_ZORA_API_KEY" codex exec -m gpt-5.5 "Reply with exactly: ZORA_CODEX_OK"

Model Choice

ModelUse
gpt-5.5Primary production smoke-test model
gpt-5.4High quality chat and coding work
gpt-5.4-miniLower-latency chat and coding work
gpt-5.3-codexCodex route published by Zora
gpt-5.2-codexCodex route published by Zora
gpt-5.2General GPT route published by Zora
gpt-5.1-codex-maxHigher-capability Codex route published by Zora
gpt-5.1-codex-miniLower-latency Codex route published by Zora
gpt-5-codexCodex route published by Zora
gpt-5-codex-miniMini Codex route published by Zora
gpt-5.3-codex-sparkSpark Codex route published by Zora
codex-auto-reviewAuto-review route published by Zora

Model IDs

Current production uses exact model IDs from GET /v1/models. Do not append client-specific suffixes or custom model-mode aliases.

Reasoning Effort

Direct Responses calls can set reasoning_effort or effort tolow, medium, high, or xhigh. Keepmodel as an exact model ID.

Responses effort
{ "model": "gpt-5.5", "reasoning_effort": "high", "input": "Review this patch and list the riskiest edge cases." }

Direct API Check

If Codex config looks correct but the CLI still fails, test the same key against the Responses route. This checks Zora authentication and model availability without running a full agent task.

curl
curl https://api.zora.io.vn/v1/responses \ -H "Authorization: Bearer YOUR_ZORA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-5.5", "reasoning_effort": "medium", "input": "Reply with exactly: ZORA_RESPONSES_OK", "max_output_tokens": 20 }'

What Zora Handles

  • /v1/responses for Codex CLI custom provider traffic.
  • /v1/chat/completions for OpenAI-compatible chat tools.
  • /v1/models for model discovery.
  • Usage accounting for requests, input tokens, output tokens, and cache token fields when they are available.
  • Resilient routing for chat and coding traffic, with clear retry guidance when a route is temporarily unavailable.

Troubleshooting

SymptomCheck
401 invalid_api_keyConfirm ZORA_API_KEY is set in the same shell that launches Codex and matches the full, active dashboard key.
403 model_not_allowedStart with gpt-5.5 or ask support to enable the requested model for the key.
429 or temporarily unavailable routeFollow the retry header, reduce Codex concurrency, or move the tester to a higher RPM key.
Codex ignores ZoraCheck ~/.codex/config.toml, especially model_provider = "zora" and wire_api = "responses".
Codex says tools are unavailableUpdate to the current Zora gateway and keep wire_api = "responses". Zora now bridges Codex exec_command tool calls for workspace tasks.
Beta test scope
For the first external user, test a tiny repository and one simple edit first. Codex can make many sequential requests on larger tasks, so start with gpt-5.5 and only move to other Zora Codex IDs after the smoke test succeeds.

For a human-oriented overview, see the Codex CLI custom provider guide.