{
  "id": "create-service",
  "title": "Create a LangCache service",
  "url": "https://redis.io/docs/latest/operate/rc/langcache/create-service/",
  "summary": "",
  "tags": [
    "docs",
    "operate",
    "rc"
  ],
  "last_updated": "2026-04-01T08:10:08-05:00",
  "page_type": "content",
  "content_hash": "fb3bf2c983f16fb92febdce5129022fae4fa1fec4eee8811f3e7dc7158ebae7c",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Redis LangCache provides vector search capabilities and efficient caching for AI-powered applications. This guide walks you through creating and configuring a LangCache service in Redis Cloud."
    },
    {
      "id": "prerequisites",
      "title": "Prerequisites",
      "role": "content",
      "text": "To create a LangCache service, you will need:\n\n- A Redis Cloud database. If you don't have one, see [Create a database]().\n\n    \nLangCache does not support the following databases during public preview:\n- Databases with a [CIDR allow list]()\n- [Active-Active]() databases\n- Databases with the [default user]() turned off\n    \n\n- An API key for your embedding provider, if not using the default Redis embedding provider. LangCache supports [OpenAI](https://platform.openai.com/api-keys) and the Redis embedding provider during public preview."
    },
    {
      "id": "create-a-langcache-service",
      "title": "Create a LangCache service",
      "role": "content",
      "text": "From the [Redis Cloud console](https://cloud.redis.io/), select **LangCache** from the left-hand menu. \n\nIf you have not already created a LangCache service, you'll see a page with an introduction to LangCache. Otherwise, select **New service** to go to the LangCache introduction page.\n\n\n\nFrom here: \n\n- Select **Quick create** to create a LangCache service with default settings using your Free 30MB database. If you haven't created a Free database yet, Redis Cloud will create one and set up the LangCache service for you.\n\n    \n\n    After Redis Cloud creates your LangCache service, a window containing your LangCache service key will appear. Select **Copy** to copy the key to your clipboard. \n\n    \n\n    \nThis is the only time the value of the user key is available. Save it to a secure location before closing the dialog box.<br/><br/>\n\nIf you lose the service key value, you will need to [generate a new service key]() to be able to use the LangCache API.\n    \n\n    After your cache is created, you can [use the LangCache API]() from your client app.\n\n    You can also [view and edit the cache]() and [monitor the cache's performance]().\n\n- If you want to customize your LangCache service, select **Create custom service**.\n\n    \n\n    This takes you to the **Create LangCache service** page. The page is divided into the following sections:\n\n    1. The [General settings](#general-settings) section defines basic properties of your service.\n    1. The [Embedding settings](#embedding-settings) section defines the embedding model used by your service.\n    1. The [Attributes settings](#attributes-settings) section allows you to define attributes for your service."
    },
    {
      "id": "general-settings",
      "title": "General settings",
      "role": "content",
      "text": "The **General settings** section defines basic properties of your service.\n\n\n\n| Setting name          |Description|\n|:----------------------|:----------|\n| **Service name** | Enter a name for your LangCache service. We recommend you use a name that describes your service's purpose. |\n| **Select database** | Select the Redis Cloud database to use for this service from the list. |\n| **TTL** | The time to live (TTL) for cache entries, in milliseconds. Default: `No expiration` - items in the cache will remain until manually removed. |\n| **User for this service** | The [database access user]() to use for this service. LangCache only supports the [`default` user]() during public preview. |"
    },
    {
      "id": "embedding-settings",
      "title": "Embedding settings",
      "role": "content",
      "text": "The **Embedding settings** section defines the embedding model used by your service.\n\n\n\nRequired settings depend on the embedding provider you select. \n\n| Setting name          |Description|\n|:----------------------|:----------|\n| **Embedding Provider** | The embedding provider to use for your service. Select between `Redis`, `OpenAI`, and `Bring your own`. <br/>Any embedding provider you use must support the [OpenAI embeddings API](https://platform.openai.com/docs/api-reference/embeddings). |\n| **Embedding provider API key** | Enter your embedding provider's API key *(`OpenAI` and `Bring your own` embedding providers only)* |\n| **Embedding provider URL** | Enter your embedding provider's API URL *(`Bring your own` embedding provider only)* |\n| **Model** | Select or enter the embedding model to use for your service. |\n| **Similarity threshold** | Set the minimum similarity score required to consider a cached response a match. Range: `0.5` to `1.0`. Default: `0.85`<br/><br/>A higher value means more precise matches, but if it's too high, you will compromise on the number of matches and may lose relevant matches. A lower value means more matches, but may include less relevant matches. We recommend starting between `0.8` and `0.9` and then fine-tuning based on your results. |"
    },
    {
      "id": "attributes-settings",
      "title": "Attributes settings",
      "role": "content",
      "text": "Attributes provide powerful scoping capabilities for your LangCache operations. Think of them as tags or labels that help you organize and manage your cached data with precision.\n\nThe **Attributes settings** section allows you to define attributes for your service. It is collapsed by default.\n\n\n\nLangCache allows you to define up to 5 custom attributes that align with your specific use case. To add a new attribute:\n\n1. Select **Add attribute**.\n\n    \n\n1. Give your custom attribute a descriptive name and select the check mark button to save it.\n\n    \n\nAfter you save your custom attribute, it will appear in the list of custom attributes. Use the **Delete** button to remove it.\n\n\n\nYou can also select **Add attribute** again to add an additional attribute."
    },
    {
      "id": "create-service",
      "title": "Create service",
      "role": "content",
      "text": "When you are done setting the details of your LangCache service, select **Create** to create it.\n\n\n\nA window containing your LangCache service key will appear. Select **Copy** to copy the key to your clipboard. \n\n\n\n\nThis is the only time the value of the user key is available. Save it to a secure location before closing the dialog box.<br/><br/>\n\nIf you lose the service key value, you will need to [generate a new service key]() to be able to use the LangCache API.\n\n\nYou'll be taken to your LangCache service's **Configuration** page. You'll also be able to see your LangCache service in the LangCache service list.\n\n\n\nIf an error occurs, verify that:\n- Your database is active.\n- You have provided a valid OpenAI API key.\n- You have provided valid values for all the required fields.\n\nFor help, [contact support](https://redis.io/support/)."
    },
    {
      "id": "next-steps",
      "title": "Next steps",
      "role": "content",
      "text": "After your cache is created, you can [use the LangCache API]() from your client app.\n\nYou can also [view and edit the cache]() and [monitor the cache's performance]()."
    }
  ],
  "examples": []
}
