---
title: "Create a GenAI config"
method: POST
path: "/gen_ai_integration_configs"
tags: ["GenAI Configurations"]
---

# Create a GenAI config

`POST /gen_ai_integration_configs`

## Request

- Base URL: `https://dataops.nexla.io/nexla-api`
- URL: `https://dataops.nexla.io/nexla-api/gen_ai_integration_configs`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nexla/apis/nexla-rest-api/docs/gen_ai_integration_configs/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a GenAI configuration.

## Request body

- GenAiConfigPayload
  - `name` string
  - `description` string, nullable
  - `status` 'active' | 'paused', nullable
  - `config` object
    - `api_version` string, nullable
    - `openai_model` string, nullable
    - `google_ai_model` string, nullable
    - `enable_doc_recommendations` boolean
  - `type` 'genai_openai' | 'genai_googleai'
  - `data_credentials_id` integer

## Response `200`

Success

- GenAiConfig
  - `id` integer
  - `owner` UserSimplified
    - `id` integer
    - `full_name` string
    - `email` string
    - `email_verified_at` string, date-time
  - `org` OrgSimplified
    - `id` integer
    - `name` string
    - `email_domain` string
    - `email` string
    - `client_identifier` string
    - `org_webhook_host` string
  - `data_credentials` DataCredential
    - `id` integer
    - `name` string
    - `description` string
    - `owner` UserSimplified
      - `id` integer
      - `full_name` string
      - `email` string
      - `email_verified_at` string, date-time
    - `org` OrgSimplified
      - `id` integer
      - `name` string
      - `email_domain` string
      - `email` string
      - `client_identifier` string
      - `org_webhook_host` string
    - `access_roles` string[]
    - `credentials_version` string
    - `managed` boolean
    - `credentials_type` string
    - `connector` object
      - `id` integer
      - `type` string
      - `connection_type` string
      - `name` string
      - `description` string
      - `nexset_api_compatible` boolean
    - `api_keys` unknown[]
      - unknown
    - `credentials_non_secure_data` object
    - `verified_status` string
    - `verified_at` string, date-time
    - `copied_from_id` integer
    - `updated_at` string, date-time
    - `created_at` string, date-time
    - `tags` unknown[]
      - unknown
  - `name` string
  - `description` string
  - `status` 'ACTIVE' | 'PAUSED'
  - `config` object
    - `api_version` string
    - `openai_model` string
    - `google_ai_model` string
    - `enable_doc_recommendations` boolean
  - `type` 'genai_openai' | 'genai_googleai'

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden

---

[API](https://skmtc.dev/nexla/apis/nexla-rest-api.md) - [All operations](https://skmtc.dev/nexla/apis/nexla-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nexla/apis/nexla-rest-api/revisions/ef02be92fe7b?raw)
