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.

2 min read Updated View as Markdown Report a problem

A Direct OpenAI connection sends requests to the OpenAI API with your organization’s own OpenAI API key.

Connect

  1. 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.
  2. In ACOG, open Admin → Providers → Connect provider, choose Direct and OpenAI, and paste the key.
  3. Review the models and choose a default.

Settings

SettingNotes
Base URLDefaults to https://api.openai.com. On the hosted service it must be a public HTTPS address on port 443.
ModelsThe GPT models this connection serves
Cache lifetimeHow 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 seeCauseFix
422 upstream_auth_failedOpenAI rejected the stored keyPaste a valid key into the connection
422 model_access_requiredThe OpenAI project cannot use the modelCheck the project’s model access
429 from OpenAIYour OpenAI project’s rate limitRaise the limit with OpenAI, or declare the model on a second connection so ACOG can spread load