---
title: "Create a binding of GenAI config for the org for specific usage."
method: POST
path: "/gen_ai_org_settings"
tags: ["GenAI Configurations"]
---

# Create a binding of GenAI config for the org for specific usage.

`POST /gen_ai_org_settings`

## Request

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

Activates a GenAI configuration for specific usage. All other bindings for the same usage will be deactivated.

## Headers

- `Accept` 'application/vnd.nexla.api.v1+json' | 'application/json': Setting to `application/vnd.nexla.api.v1+json` is recommended.

## Request body

- GenAiOrgSettingPayload
  - `org_id` integer
  - `gen_ai_config_id` integer
  - `gen_ai_usage` 'all' | 'gen_docs' | 'check_code'

## Response `200`

Success

- GenAiOrgSetting
  - `id` integer
  - `org_id` integer
  - `gen_ai_usage` 'gen_docs' | 'check_code' | 'all'
  - `get_ai_config_id` integer
  - `gen_ai_config` 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

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found

---

[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)
