OpenAI
Connect the OpenAI API to ACOG with your own API key and call GPT models through either the OpenAI or the Anthropic API shape.
A Direct OpenAI connection sends requests to the OpenAI API with your organization’s own OpenAI API key.
Connect
- In the OpenAI platform, create an API key in the project whose limits and billing ACOG’s traffic should use. A restricted key needs the Model capabilities (chat completions, embeddings) and read access to models.
- In ACOG, open Admin → Providers → Connect provider, choose Direct and OpenAI, and paste the key.
- Review the models and choose a default.
Settings
| Setting | Notes |
|---|---|
| Base URL | Defaults to https://api.openai.com. On the hosted service it must be a public HTTPS address on port 443. |
| Models | The GPT models this connection serves |
| Cache lifetime | How long OpenAI keeps prompt-cache entries for requests ACOG marks: in memory (the provider default) or 24 hours, where the model supports it. See Caching. |
What ACOG adds to your requests
ACOG sets a prompt_cache_key derived from each request’s system prompt and tools, so requests that share the same prefix land on the same OpenAI prompt cache and are billed at the cached-input rate. It never changes your prompt.
Calling OpenAI through ACOG
- The Chat Completions API at
https://gateway.acog.tessarac.com/v1. - The Embeddings API.
- The Messages API: ACOG translates Anthropic-shaped requests to OpenAI and back, so an Anthropic SDK can call a GPT model.
- The OpenAI API exactly as OpenAI defines it, including the Responses API, at the native route
https://gateway.acog.tessarac.com/openai/v1. See Native provider routes.
Troubleshooting
| What you see | Cause | Fix |
|---|---|---|
422 upstream_auth_failed | OpenAI rejected the stored key | Paste a valid key into the connection |
422 model_access_required | The OpenAI project cannot use the model | Check the project’s model access |
429 from OpenAI | Your OpenAI project’s rate limit | Raise the limit with OpenAI, or declare the model on a second connection so ACOG can spread load |