Skip to content

OpenAI

This is OpenAI Platform API federation. Codex’s own federation signs in a ChatGPT user and doesn’t authorize API calls. Read How provider setup works first.

You need an OpenAI role that can manage workload identity providers and service account mappings.

Field Value
Issuer https://identity.avant.codes
Audience https://api.openai.com/v1
Subject The exact subject from the Avant form

In Avant, open New workspace and choose Direct → OpenAI. Copy the subject.

In OpenAI, open Organization settings → Security → Workload identity provider and create an OIDC provider. An X.509 provider needs a client certificate, which Avant doesn’t use.

Field Value
OIDC issuer URL https://identity.avant.codes
Custom OIDC discovery URL Off
Uploaded JWKS Off

If the issuer is already registered, reuse that provider.

On the provider, add one service account mapping:

Field Value
Key sub
Value The exact subject
Project The OpenAI project that should own the usage
Service account A new or existing service account in that project
Permissions api.model.request, or leave blank
  • Leaving permissions blank means the token acts as the service account. A permissions list that doesn’t include api.model.request fails Verify.
  • OpenAI issues a token only when exactly one enabled mapping matches. A second matching mapping for the same subject breaks the exchange.
Avant field Where
Identity provider ID The provider list, looks like idp_…
Service account ID The mapping details

Create the workspace and run Verify.

Terminal window
avant workspace create --name gpt --provider openai \
--identity-provider-id idp_... --service-account-id <id>
avant workspace verify gpt

The workspace serves Chat Completions (/v1/chat/completions) and Responses (/v1/responses). OpenAI SDKs need https://proxy.avant.codes/v1 as the base URL.

ModelAPIHarnesses
gpt-5.6-terraChat Completions, ResponsesCodex, OpenCode, Pi, Oh My Pi
gpt-5.6-lunaChat Completions, ResponsesCodex, OpenCode, Pi, Oh My Pi
gpt-6-astraChat Completions, ResponsesCodex, OpenCode, Pi, Oh My Pi
gpt-6-solChat Completions, ResponsesCodex, OpenCode, Pi, Oh My Pi
gpt-6.1-sol (default)Chat Completions, ResponsesCodex, OpenCode, Pi, Oh My Pi
gpt-6.1-terraChat Completions, ResponsesCodex, OpenCode, Pi, Oh My Pi
gpt-6.2-astraChat Completions, ResponsesCodex, OpenCode, Pi, Oh My Pi
gpt-6.2-solChat Completions, ResponsesCodex, OpenCode, Pi, Oh My Pi
gpt-6-lunaChat Completions, ResponsesCodex, OpenCode, Pi, Oh My Pi