OpenAI()
GPT models direct from OpenAI, with your own API key. Costs go direct to the vendor at their rates — no markup, nothing on your Axon balance.
export default defineProfile({
providers: [OpenAI()],
})
Serves openai/*.
Credentials
Set the environment variable, or pass key on the declaration:
OPENAI_API_KEY=...
providers: [OpenAI({ key: process.env.MY_OWN_VAR })]
You can also store this key in your Axon account vault through the cloud client:
await cloud.user.vault.connections.get("openai-api").connect({ key: apiKey })
A fresh host signed into the same account can use the connection. Profiles without
an explicit providers list discover active account connections automatically;
an explicit list continues to restrict which providers that machine uses.
Explicit keys and environment variables take precedence over the account vault.
A custom url requires an explicit credential. Provider SDKs ship with Axon.
Options
OpenAI(options?: ProviderOptions)
| Option | Default | Description |
|---|---|---|
key | OPENAI_API_KEY | Your own credential, passed directly |
url | the provider's API | Endpoint override |
slots | unbounded | Ceiling on concurrent calls a fanned-out role may spend here |
Model ids
Bare OpenAI slugs:
export default defineAgent({ model: "openai:gpt-5.5" })
Not the same as Codex()
Codex() reaches OpenAI through a ChatGPT subscription over
OAuth, with a per-account catalogue and no per-token cost. This is the API platform,
billed per token. Same vendor, different product, different bill.