> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vijil.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenAI

> Legacy OpenAI integration docs copied from the integrations-section branch.

You can register agents on Vijil that use OpenAI models such as `gpt-4.1`, `gpt-4o`, `gpt-4o-mini`, `o1`, and others.

## Prerequisites

* You have an OpenAI account with an active API key.
* Your OpenAI account has access to the models you plan to use (for example `gpt-4.1`, `gpt-4o`, or `o1`).
* You have access to a Vijil team and permission to manage **[Keys](https://evaluate.vijil.ai/keys)** and **[Agents](/tutorials/manage-agents/)**.

## Store OpenAI Credentials in Vijil

1. In Vijil, go to **[Keys](https://evaluate.vijil.ai/keys) > Add new key**.
2. From the **Model Hub** dropdown, select **OpenAI**.
3. Enter your OpenAI API key and any optional rate limit overrides you want for this key.
4. Save the key configuration.

Once saved, this key can be reused across multiple OpenAI-based agents.

## Register an Agent on Vijil

With an OpenAI API key configured, you can register an agent that uses OpenAI:

<img src="https://mintcdn.com/vijil/t1_8aRtSIj494eFA/images/legacy/openai.webp?fit=max&auto=format&n=t1_8aRtSIj494eFA&q=85&s=8b3cee20347f2782e18fc0726482a958" alt="Setting up an OpenAI-based Agent in Vjil" width="920" height="885" data-path="images/legacy/openai.webp" />

1. Press **Register Agent**.
2. Enter an [Agent](/tutorials/manage-agents/) name.
3. Select **OpenAI** as the **Hub**.
4. Enter a model name (for example `gpt-4.1`, `gpt-4o`, or `o1-mini`). See the OpenAI documentation for the list of available models.
5. Select an existing OpenAI API key you configured earlier, or create a new one.
6. Add a **System Prompt** if you want Vijil to send a default system prompt with every request to this agent.

## Enterprises

If your organization uses enterprise-only features with Vijil:

1. Add an **MCP server URL** so the agent can access MCP tools exposed by that server.
2. Add an **A2A Agent Card URL** so this agent can participate in agent-to-agent workflows defined in your enterprise.
