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

# OpenAI

> Configure an OpenAI credential in Validio to leverage GPT models for validator recommendations and generating SQL queries in custom validators and filters.

OpenAI provides advanced AI language models, including the GPT family of models for text generation, analysis, and conversation. By adding an OpenAI credential to Validio, you can leverage these capabilities to generate validator recommendations for monitoring and SQL queries for custom validation and filtering.

![The OpenAI credential configuration form, showing name, model, and API key fields](https://mintcdn.com/validio/h4NQPs1kJwlpB1Yj/images/docs/integrations/810-openai-credential-config.png?fit=max\&auto=format\&n=h4NQPs1kJwlpB1Yj\&q=85\&s=e61d0bf948c96b41891abdbb8ffa6ffe)

Configuration for OpenAI credential

## Prerequisites

Before setting up your OpenAI credential, ensure you have:

* Enabled the **Allow LLM credentials** setting in your Validio Workspace. See [Managing Workspace Settings](https://docs.validio.io/v10.2/docs/access-and-settings/settings/workspace-settings.md).
* Appropriate permissions to create credentials (requires `credentials:WRITE` permissions for the Namespace). See [Managing Roles](https://docs.validio.io/v10.2/docs/access-and-settings/settings/managing-roles.md).
* An active OpenAI account and an OpenAI API key (you can generate one from the [OpenAI Platform](https://platform.openai.com/))

## Add an OpenAI credential

> [!NOTE]
>
> Because each OpenAI credential is tied to one language model, you should add an OpenAI credential for each model you want to use in Validio.

To add an OpenAI credential,

1. Navigate to **Credentials** and click **+ New credential**.
2. **Namespace**: Select the namespace where the resources will be created.
3. **Credential Type**: Select **OpenAI** from the dropdown.
4. **Configuration**: Complete the required parameters.

   | Parameter | Description |
   | :- | :- |
   | Name | A unique identifier for this credential. |
   | Model | Select from available OpenAI models (such as GPT-5, GPT-4.1) or, if the desired model is not in the list, enter the model ID. Refer to [Models overview](https://platform.openai.com/docs/models) in OpenAI documentation. |
   | API key | Your OpenAI API key from the OpenAI Platform. The valid API key starts with `sk-` |
   | Custom base URL | (Optional) Custom base URL for the OpenAI API. Only needed if using a proxy or custom endpoint. |
   | Organization | (Optional) Your OpenAI organization ID. Only needed if your API key belongs to multiple organizations. |
   | Project | (Optional) Your OpenAI project ID, used for usage tracking within your organization. |
5. (Optional) Click **Test credential** to validate that Validio can successfully connect to OpenAI using your configuration. If the test fails, verify your API key is correct.
6. Click **Create credential** to save your configuration.

## Next steps

With your OpenAI credential configured, you can leverage GPT models across various Validio features:

* **[Custom SQL validators](https://docs.validio.io/v10.2/docs/validators/validator-types/custom-sql.md)**: Generate complex validation queries or fix errors in your SQL queries.
* **[SQL filters](https://docs.validio.io/v10.2/docs/filters/filter-types.md#sql-filter)**: Create sophisticated filtering conditions and data selection criteria.
* **[Validator recommendations](https://docs.validio.io/v10.2/docs/ai-features/validator-recommendations.md)**: Profile your data and generate recommendations to quickly set up monitoring
