Nexbion

AI CLIENT GUIDES

Use the Nexbion API with VS Code Codex

VS Code hosts the Codex extension. Provider, model, and authentication settings still come from the user-level Codex configuration.

Prerequisites

  • The Codex guide is complete
  • codex exec succeeds in a terminal
  • The VS Code workspace is trusted

Configuration steps

  1. 1

    Open a trusted workspace in VS Code.

  2. 2

    Open the Codex panel and confirm the Nexbion model is available.

  3. 3

    If the panel has not picked up the configuration, run Developer: Reload Window.

  4. 4

    Validate again in the VS Code terminal to confirm the host uses the correct environment.

Visual walkthrough

Visual Studio Code trusted workspace dialog
01Visual Studio Code trusted workspace dialog
Codex panel in Visual Studio Code
02Codex panel in Visual Studio Code
Visual Studio Code terminal for validation
03Visual Studio Code terminal for validation
Codex configVS Code CodexNexbion API

Validate the connection

PowerShell: GET /v1/models
$headers = @{ Authorization = "Bearer $env:NEXBION_API_KEY" }
Invoke-RestMethod -Uri "https://api.nexbion.com/v1/models" -Headers $headers
Linux/macOS: curl POST /v1/responses
curl https://api.nexbion.com/v1/responses \
  -H "Authorization: Bearer YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.5",
    "input": [
      {
        "role": "user",
        "content": "Reply with exactly pong"
      }
    ],
    "max_output_tokens": 20
  }'
Windows PowerShell: curl.exe POST /v1/responses
$body = @'
{
  "model": "gpt-5.5",
  "input": [
    {
      "role": "user",
      "content": "Reply with exactly pong"
    }
  ],
  "max_output_tokens": 20
}
'@

curl.exe "https://api.nexbion.com/v1/responses" `
  -H "Authorization: Bearer YOUR_API_KEY_HERE" `
  -H "Content-Type: application/json" `
  -d $body
PowerShell: POST /v1/responses
$headers = @{ Authorization = "Bearer $env:NEXBION_API_KEY" }
$body = @{
  model = "oc/big-pickle"
  input = @(@{ role = "user"; content = @(@{
    type = "input_text"; text = "Reply only with OK."
  }) })
} | ConvertTo-Json -Depth 8 -Compress

Invoke-WebRequest -Uri "https://api.nexbion.com/v1/responses" `
  -Method Post -Headers $headers -ContentType "application/json" -Body $body
Codex smoke test
codex exec --json --skip-git-repo-check --sandbox read-only `
  --config approval_policy='never' "Reply only with OK." | Select-String 'agent_message'

Do not duplicate the API key in settings.json, workspace settings, or extension configuration. VS Code should inherit the Codex configuration.

Keep your API key in a local secret or environment variable. Never place it in a repository, screenshot, workspace setting, or application code.