ClipRelay AI

Codex CLI API key setup: a custom Responses provider for GPT-6.2 Astra | ClipRelay AI Blog

Use a named provider and select it for one invocation. Keep your default login intact and check the first billed request.

Published: 2026-12-06 · Featured Model: gpt-6.2-astra

TL;DR: Use a named provider and select it for one invocation. Keep your default login intact and check the first billed request.

ClipRelay rates and worked budgets

ModelTierUSD / 1M tokens
gpt-6.2-astraOrdinary input$2
gpt-6.2-astraCache read$0.1
gpt-6.2-astraCache write$2.5
gpt-6.2-astraOutput$10
PlanQuantity (1M tokens)USD
One requestOrdinary input × 0.008 + Output × 0.001$0.026
10 tasks × 4 callsOrdinary input × 0.32 + Output × 0.04$1.04

— means no live quote. Estimates use the listed retail tiers. Check actual usage in your billing records.

Monthly calculator · Live service status

Add a provider without changing the default

In ~/.codex/config.toml add this table once, or edit the existing table of the same name. Set CLIPRELAY_API_KEY in the shell that launches Codex. env_key holds the variable name. Keep the secret out of project files. Here the base URL includes /v1 because Codex appends /responses.

[model_providers.cliprelay]
name = "ClipRelay"
base_url = "https://cliprelayai.com/v1"
env_key = "CLIPRELAY_API_KEY"
wire_api = "responses"

Verify the CLI separately from Chat Completions

The curl sample at the end checks key and model access over Chat Completions only. Run the Bash command below in a scratch repository to test Responses. Check the first reply and ledger entry, then try a read-only file lookup to test tools. If chat works but the CLI fails, check the provider override, streaming errors and Responses support on the selected route.

codex -c 'model_provider="cliprelay"' -m gpt-6.2-astra "Reply OK without using tools."

Return to your usual provider

Quit and start without these overrides. Each budgeted call uses 8,000 ordinary input and 1,000 output tokens. A single coding task may consume several calls as it reads files and tests the patch.

Run one paid sample

Set CLIPRELAY_API_KEY in Bash. Use a funded key with access to this model. This submits one request.

curl -fsS https://cliprelayai.com/v1/chat/completions \
  -H "Authorization: Bearer $CLIPRELAY_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "gpt-6.2-astra",
  "messages": [
    {
      "role": "user",
      "content": "Reply OK."
    }
  ]
}
JSON

Global Cards & Alipay Instant Checkout ($5 Minimum)

Self-serve USD top-ups from $5 ($5–$500+) via Visa, Mastercard, Amex, Apple Pay, Google Pay, and Alipay. Credits never expire, and failed video/image tasks automatically refund 100%. Support: support@cliprelayai.com.