Get inspired at ContentCon. Learn more and register today
Get inspired at ContentCon. Learn more and register today
Contentstack.comAcademyLogin
CS-log-dark.svgCS-log-dark.svg
  • Changelog
  • APIs
  • SDKs

Platform

  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing

Solutions

  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases

Resources

  • Academy
  • Docs
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • Webinars
  • Podcasts
  • Glossary
  • Content generative library
  • Community
  • Headless CMS
  • Composable AXP
  • Personalization
  • CDP

Customers

  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support

Partners

  • Overview
  • Find a partner
  • Login

Company

  • About us
  • News
  • Customer support portal
  • Contact

Social

  • Facebook
  • LinkedIn
  • Instagram
  • GitHub
  • YouTube
  • Discord
  • X
LegalTermsPrivacyTrust Center

Cookie settings

Copyright © 2026 Contentstack Inc. All rights reserved.
/
  1. Home
  2. APIs
  3. Brand Kit Management API
  4. Custom Credentials (LLM) Configuration

Custom Credentials (LLM) Configuration

markdownView as Markdown

Custom Credentials (LLM) Configuration allows you to integrate your own Large Language Model (LLM) credentials instead of using Contentstack’s default API settings. By using custom credentials, you can specify details such as the API provider, model type, and other required fields, enabling a personalized setup that aligns with your specific requirements.

Get Custom Credentials

GEThttps://brand-kits-api.contentstack.com/v1/brand-kits/{brand_kit_uid}/llm-configs?include_decrypted_keys={boolean}

The Get Custom Credentials request fetches the custom credentials from a Brand Kit in an organization.

To configure the permissions for your application via OAuth, include the brand-kits:read scope.

Sample Response
Status|200 OK
123456789101112131415161718192021
{
    "llm_config": {
        "_id": "672b04a6e3d93d9a8269741f",
        "deleted_at": false,
        "organization_uid": "blt53d0371e00331654",
        "uid": "cse56a3c0b2a7a4d",
        "__v": 0,
        "created_at": "2024-11-06T05:54:46.838Z",
        "deleted_by": false,
        "mode": 1,
        "updated_at": "2024-11-08T07:26:41.370Z",
        "updated_by": "blt520e013f9bbe3976",
        "config": {
            "model": "gpt-4o-mini",
            "provider": "openai",
            "decrypted_keys": {
                "api_key": "Key-XXXXXXXXXXXXXX"
            }
        }
    }
}

Set Custom Credentials

PUThttps://brand-kits-api.contentstack.com/v1/brand-kits/{brand_kit_uid}/llm-configs

The Set Custom Credentials request lets you configure the custom API credentials for Brand Kit.

To configure the permissions for your application via OAuth, include the brand-kits:manage scope.

Here’s an example of the Request Body for configuring the Brand Kit using OpenAI API provider:

{
"include_decrypted_keys": true,
"llm_config": {
"mode": 1,
"config": {
"provider": "openai",
"keys": {
"api_key": "Key-XXXXXXXXXXXXXX"
},
"model": "gpt-4o-mini"
}
}
}
Sample Request
12345678910111213
{
    "include_decrypted_keys": true,
    "llm_config": {
        "mode": 1,
        "config": {
            "provider": "openai",
            "keys": {
                "api_key": "Key-XXXXXXXXXXXXXX"
            },
            "model": "gpt-4o-mini"
        }
    }
}
Sample Response
Status|200 OK
12345678910111213141516171819202122
{
    "message": "llm config updated successfully",
    "llm_config": {
        "_id": "672b04a6e3d93d9a8269741f",
        "deleted_at": false,
        "organization_uid": "blt53d0371e00331654",
        "uid": "cse56a3c0b2a7a4d",
        "__v": 0,
        "created_at": "2024-11-06T05:54:46.838Z",
        "deleted_by": false,
        "mode": 1,
        "updated_at": "2024-11-08T07:26:41.370Z",
        "updated_by": "blt520e013f9bbe3976",
        "config": {
            "model": "gpt-4o-mini",
            "provider": "openai",
            "decrypted_keys": {
                "api_key": "Key-XXXXXXXXXXXXXX"
            }
        }
    }
}
Hide Parameters

URL Parameters

brand_kit_uidrequiredstring

Enter the Brand Kit UID.

Example:

your_brand_kit_uid

Query Parameters

include_decrypted_keysoptionalstring

The “include_decrypted_keys” parameter allows you to fetch LLM Configuration details in encrypted format when set to true.

Example:

true

Headers

organization_uidrequiredstring

Enter the Organization UID.

Example:

your_organization_uid
authtokenrequiredstring

Enter the authtoken.

Example:

your_authtoken
authorizationrequiredstring

Enter your OAuth token. Learn more about Authentication.

Example:

[Bearer <OAuth token>]
Hide Parameters

URL Parameters

brand_kit_uidrequiredstring

Enter the Brand Kit UID.

Example:

your_brand_kit_uid

Headers

organization_uidrequiredstring

Enter the Organization UID.

Example:

your_organization_uid
authtokenrequiredstring

Enter the authtoken.

Example:

your_authtoken
authorizationrequiredstring

Enter your OAuth token. Learn more about Authentication.

Example:

[Bearer <OAuth token>]