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
Open a trusted workspace in VS Code.
- 2
Open the Codex panel and confirm the Nexbion model is available.
- 3
If the panel has not picked up the configuration, run Developer: Reload Window.
- 4
Validate again in the VS Code terminal to confirm the host uses the correct environment.
Visual walkthrough
Codex configVS Code CodexNexbion API
Validate the connection
$headers = @{ Authorization = "Bearer $env:NEXBION_API_KEY" }
Invoke-RestMethod -Uri "https://api.nexbion.com/v1/models" -Headers $headerscurl 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
}'$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$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 $bodycodex 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.


