Skip to main content

Replace LLM provider

PUT https://api.rollstack.com/public/v1/organization/llm-provider

Creates or replaces the organization's custom LLM provider, on the Enterprise plan only. Only owners, and admins an owner allowed to manage the AI provider, may call it: members' keys can't carry organization:write. The keys are saved only once one short call on each of their models works: otherwise nothing is saved and the call fails with a 400 (code ai-provider-test-failed); the AI provider setting in the app says which model failed and why. Calls are limited to 10 a minute for each organization. Every owner gets an email when the provider is set up, replaced or deleted. Web search uses OpenAI, so saving a provider that moves it to Rollstack's OpenAI account (any provider but OpenAI on its global host) turns web search off, unless the organization already had that kind of provider; an owner can turn it back on.

Requires the organization:write scope.

Operation ID: setLLMProvider.

Headers

  • Idempotency-Key (string): A unique value, such as a UUID, that makes retrying this call safe. A retry with the same key within 24 hours answers the first call's result instead of running it again. Use a new key for each new call. From 1 to 255 printable ASCII characters.

Request body, required

application/json

  • When type is anthropic
    • type (anthropic, required): Runs the slides agent on your own Anthropic organization, through the Anthropic API, with Claude Opus 5.5 (claude-opus-5-5) for its main work and Claude Haiku 5.5 (claude-haiku-5-5) for its quick steps. There are no models to pick or deploy.
    • credentials (object, required): How Rollstack signs in to your Anthropic organization: with an API key (apiKey), or without a key, through Anthropic's workload identity federation (oidc).
      • When auth is apiKey
        • auth (apiKey, required): Rollstack signs in to the provider with a secret you send in this request: an API key or, on Google Vertex AI, a service account key (clientEmail and privateKey). Rollstack saves the secret and never returns it, so to change it, send the whole setup again.
        • apiKey (string, required): An Anthropic API key, created in the Claude Console under API keys, in a workspace for Rollstack where you can also set a spend limit. Rollstack never returns it. Example: your-anthropic-api-key.
      • When auth is oidc
        • auth (oidc, required): Rollstack signs in without a saved secret: its OpenID Connect issuer signs a short-lived token for the subject rollstack:org:<id>, where <id> is your organization's id from getOrganization, and your provider exchanges the token for temporary credentials. Set up your provider to trust that issuer and to check that subject, so it accepts only your organization: setLLMProvider fails if the setup also accepts another organization's token. The AI provider setting in the app, under Settings › Features, shows the issuer, subject and audience to trust.
        • anthropicOrganizationId (string (uuid), required): The ID of your Anthropic organization, the one where you added Rollstack's issuer in the Claude Console under Settings › Workload identity federation. Example: 7c9e1f3a-5b7d-4e9f-8a1c-3e5a7c9e1f3a.
        • federationRuleId (string, required): The ID of the federation rule that lets Rollstack act as serviceAccountId. Create it in the Claude Console under Settings › Workload identity federation, once Rollstack's issuer is added there: set its subject to your organization's (see auth), add a claim condition that the audience (aud) is https://api.anthropic.com, and enable it only in workspaceId. Starts with fdrl_. Example: fdrl_01example.
        • serviceAccountId (string, required): The ID of the service account Rollstack acts as in your Anthropic organization, created in the Claude Console in the workspace the slides agent should use (workspaceId). Starts with svac_. Example: svac_01example.
        • workspaceId (string, required): The ID of the Claude Console workspace the slides agent's calls run in: the workspace of serviceAccountId, where the federation rule is enabled. Starts with wrkspc_. Example: wrkspc_01example.
  • When type is openai
    • type (openai, required): Runs the slides agent on your own OpenAI project, through the OpenAI API, with GPT-6.1 Sol (gpt-6.1-sol) for its main work and GPT-6 Luna (gpt-6-luna) for its quick steps. There are no models to pick or deploy.
    • credentials (object, required): Your OpenAI project's data residency, and how Rollstack signs in to the project: with an API key (apiKey), or without a key, through an OpenAI workload identity provider (oidc).
      • When auth is apiKey
        • dataResidency (string, required): The data residency of the OpenAI project Rollstack uses, which decides the OpenAI host Rollstack calls: global for OpenAI's global host, us or eu for its US or EU host. With global, the slides agent's web search also uses your OpenAI project. With us or eu, it uses Rollstack's OpenAI account instead, so saving turns web search off, unless the organization's provider was already OpenAI with us or eu; an owner can turn it back on in the app. One of global, us, eu.
        • auth (apiKey, required): Rollstack signs in to the provider with a secret you send in this request: an API key or, on Google Vertex AI, a service account key (clientEmail and privateKey). Rollstack saves the secret and never returns it, so to change it, send the whole setup again.
        • apiKey (string, required): An API key for the OpenAI project Rollstack uses, created on the OpenAI platform. The project must allow gpt-6.1-sol and gpt-6-luna, the models the slides agent runs on, in Project settings › Limits › Model usage. You can also give the project a monthly budget. Rollstack never returns the key. Example: your-openai-api-key.
      • When auth is oidc
        • dataResidency (string, required): The data residency of the OpenAI project Rollstack uses, which decides the OpenAI host Rollstack calls: global for OpenAI's global host, us or eu for its US or EU host. With global, the slides agent's web search also uses your OpenAI project. With us or eu, it uses Rollstack's OpenAI account instead, so saving turns web search off, unless the organization's provider was already OpenAI with us or eu; an owner can turn it back on in the app. One of global, us, eu.
        • auth (oidc, required): Rollstack signs in without a saved secret: its OpenID Connect issuer signs a short-lived token for the subject rollstack:org:<id>, where <id> is your organization's id from getOrganization, and your provider exchanges the token for temporary credentials. Set up your provider to trust that issuer and to check that subject, so it accepts only your organization: setLLMProvider fails if the setup also accepts another organization's token. The AI provider setting in the app, under Settings › Features, shows the issuer, subject and audience to trust.
        • identityProviderId (string, required): The ID of the identity provider you create on the OpenAI platform, under Settings › Security › Workload Identity Provider, with Rollstack's issuer and the audience https://api.openai.com. Map it to the service account in serviceAccountId, with sub set to your organization's subject (see auth) and aud to that audience. Example: idp_example.
        • serviceAccountId (string, required): The User ID of the OpenAI service account Rollstack acts as. Create the service account with Restricted permissions and Model capabilities set to Write, in a project with the data residency in dataResidency that allows gpt-6.1-sol and gpt-6-luna. Example: user-example.
  • When type is azure_foundry
    • type (azure_foundry, required): Runs the slides agent on Claude or GPT models deployed in your Azure AI Foundry resource, the ones you pick in credentials.models.
    • credentials (object, required): Your Azure AI Foundry resource, the models on it the slides agent runs on, and how Rollstack signs in: with the resource's API key (apiKey), or without a key, as an app registered in Microsoft Entra ID (oidc).
      • When auth is apiKey
        • resourceName (string, required): The name of your Azure AI Foundry resource, which Rollstack calls at https://<resourceName>.services.ai.azure.com. It's the first part of the host in any deployment's Target URI, such as acme-ai in https://acme-ai.services.ai.azure.com. 2 to 63 lowercase letters, digits and hyphens, starting with a letter or digit. Example: acme-ai.
        • models (object, required): The models the slides agent runs on: smart for its main work, fast for its quick steps. Make them available first: on Azure AI Foundry, deploy each under its model's name (Foundry's default), such as claude-opus-5-5; on Amazon Bedrock, enable them in Model access in region.
          • smart (string, required): The model that runs the slides agent and does its main work, such as editing slides and writing queries: claude-opus-5-5 (Claude Opus 5.5) or gpt-6.1-sol (GPT-6.1 Sol). One of claude-opus-5-5, gpt-6.1-sol.
          • fast (string): The model for the slides agent's quick steps around its main work, such as naming the chat and inspecting slides, to save cost: claude-haiku-5-5 (Claude Haiku 5.5) or gpt-6-luna (GPT-6 Luna). It can be from a different family than smart. If omitted, the smart model runs these steps too. One of claude-haiku-5-5, gpt-6-luna.
        • auth (apiKey, required): Rollstack signs in to the provider with a secret you send in this request: an API key or, on Google Vertex AI, a service account key (clientEmail and privateKey). Rollstack saves the secret and never returns it, so to change it, send the whole setup again.
        • apiKey (string, required): An API key of your Azure AI Foundry resource. Rollstack uses it for every model it calls on the resource, Claude and GPT alike, and never returns it. Example: your-azure-api-key.
      • When auth is oidc
        • resourceName (string, required): The name of your Azure AI Foundry resource, which Rollstack calls at https://<resourceName>.services.ai.azure.com. It's the first part of the host in any deployment's Target URI, such as acme-ai in https://acme-ai.services.ai.azure.com. 2 to 63 lowercase letters, digits and hyphens, starting with a letter or digit. Example: acme-ai.
        • models (object, required): The models the slides agent runs on: smart for its main work, fast for its quick steps. Make them available first: on Azure AI Foundry, deploy each under its model's name (Foundry's default), such as claude-opus-5-5; on Amazon Bedrock, enable them in Model access in region.
          • smart (string, required): The model that runs the slides agent and does its main work, such as editing slides and writing queries: claude-opus-5-5 (Claude Opus 5.5) or gpt-6.1-sol (GPT-6.1 Sol). One of claude-opus-5-5, gpt-6.1-sol.
          • fast (string): The model for the slides agent's quick steps around its main work, such as naming the chat and inspecting slides, to save cost: claude-haiku-5-5 (Claude Haiku 5.5) or gpt-6-luna (GPT-6 Luna). It can be from a different family than smart. If omitted, the smart model runs these steps too. One of claude-haiku-5-5, gpt-6-luna.
        • auth (oidc, required): Rollstack signs in without a saved secret: its OpenID Connect issuer signs a short-lived token for the subject rollstack:org:<id>, where <id> is your organization's id from getOrganization, and your provider exchanges the token for temporary credentials. Set up your provider to trust that issuer and to check that subject, so it accepts only your organization: setLLMProvider fails if the setup also accepts another organization's token. The AI provider setting in the app, under Settings › Features, shows the issuer, subject and audience to trust.
        • tenantId (string (uuid), required): The Directory (tenant) ID of your Microsoft Entra ID tenant, where you register the app Rollstack signs in as. Example: 4d6f8a0c-2e3a-4b5c-8d7e-9f1a3b5c7d9e.
        • clientId (string (uuid), required): The Application (client) ID of the app you register for Rollstack in Microsoft Entra ID, with no client secret. Give it a federated credential that trusts Rollstack's issuer for your organization's subject (see auth), with the audience api://AzureADTokenExchange, and the Cognitive Services User role on the resource. A new trust can take a few minutes to apply. Example: 2b4d6f8a-0c1e-4a3b-9d5f-7b9d1f3a5c7e.
  • When type is amazon_bedrock
    • type (amazon_bedrock, required): Runs the slides agent on Claude or GPT models in Amazon Bedrock, in your AWS account, the ones you pick in credentials.models.
    • credentials (object, required): Where Rollstack calls Amazon Bedrock, the models the slides agent runs on, and how Rollstack signs in: with a Bedrock API key (apiKey), or without a key, by assuming an IAM role (oidc).
      • When auth is apiKey
        • region (string, required): The AWS region Rollstack calls Amazon Bedrock in, such as us-east-1. It must be in dataLocation: a us- region for us, an eu- region for eu, ap-southeast-2 or ap-southeast-4 for au, ap-northeast-1 or ap-northeast-3 for jp, and any region for global. Example: us-east-1.
        • dataLocation (string, required): Where Amazon Bedrock may process the slides agent's requests to Claude models: us (United States), eu (Europe), au (Australia), jp (Japan) or global. Rollstack calls Claude through this location's cross-region inference profile, such as us.anthropic.claude-opus-5-5 or global.anthropic.claude-opus-5-5, and GPT models in region directly. One of us, eu, au, jp, global.
        • models (object, required): The models the slides agent runs on: smart for its main work, fast for its quick steps. Make them available first: on Azure AI Foundry, deploy each under its model's name (Foundry's default), such as claude-opus-5-5; on Amazon Bedrock, enable them in Model access in region.
          • smart (string, required): The model that runs the slides agent and does its main work, such as editing slides and writing queries: claude-opus-5-5 (Claude Opus 5.5) or gpt-6.1-sol (GPT-6.1 Sol). One of claude-opus-5-5, gpt-6.1-sol.
          • fast (string): The model for the slides agent's quick steps around its main work, such as naming the chat and inspecting slides, to save cost: claude-haiku-5-5 (Claude Haiku 5.5) or gpt-6-luna (GPT-6 Luna). It can be from a different family than smart. If omitted, the smart model runs these steps too. One of claude-haiku-5-5, gpt-6-luna.
        • auth (apiKey, required): Rollstack signs in to the provider with a secret you send in this request: an API key or, on Google Vertex AI, a service account key (clientEmail and privateKey). Rollstack saves the secret and never returns it, so to change it, send the whole setup again.
        • apiKey (string, required): A long-term Amazon Bedrock API key, created with an expiry for an IAM user whose policy allows only the models in models; the AI provider setting in the app shows that policy. Rollstack uses it for Claude and GPT models alike, and never returns it. Example: your-bedrock-api-key.
      • When auth is oidc
        • region (string, required): The AWS region Rollstack calls Amazon Bedrock in, such as us-east-1. It must be in dataLocation: a us- region for us, an eu- region for eu, ap-southeast-2 or ap-southeast-4 for au, ap-northeast-1 or ap-northeast-3 for jp, and any region for global. Example: us-east-1.
        • dataLocation (string, required): Where Amazon Bedrock may process the slides agent's requests to Claude models: us (United States), eu (Europe), au (Australia), jp (Japan) or global. Rollstack calls Claude through this location's cross-region inference profile, such as us.anthropic.claude-opus-5-5 or global.anthropic.claude-opus-5-5, and GPT models in region directly. One of us, eu, au, jp, global.
        • models (object, required): The models the slides agent runs on: smart for its main work, fast for its quick steps. Make them available first: on Azure AI Foundry, deploy each under its model's name (Foundry's default), such as claude-opus-5-5; on Amazon Bedrock, enable them in Model access in region.
          • smart (string, required): The model that runs the slides agent and does its main work, such as editing slides and writing queries: claude-opus-5-5 (Claude Opus 5.5) or gpt-6.1-sol (GPT-6.1 Sol). One of claude-opus-5-5, gpt-6.1-sol.
          • fast (string): The model for the slides agent's quick steps around its main work, such as naming the chat and inspecting slides, to save cost: claude-haiku-5-5 (Claude Haiku 5.5) or gpt-6-luna (GPT-6 Luna). It can be from a different family than smart. If omitted, the smart model runs these steps too. One of claude-haiku-5-5, gpt-6-luna.
        • auth (oidc, required): Rollstack signs in without a saved secret: its OpenID Connect issuer signs a short-lived token for the subject rollstack:org:<id>, where <id> is your organization's id from getOrganization, and your provider exchanges the token for temporary credentials. Set up your provider to trust that issuer and to check that subject, so it accepts only your organization: setLLMProvider fails if the setup also accepts another organization's token. The AI provider setting in the app, under Settings › Features, shows the issuer, subject and audience to trust.
        • roleArn (string, required): The ARN of the IAM role Rollstack assumes to call Amazon Bedrock. Its trust policy must trust Rollstack's issuer, added as an OIDC provider in your AWS account, for your organization's subject (see auth) and the audience sts.amazonaws.com. Its permissions should allow only the models in models. The AI provider setting in the app gives the AWS CLI commands. Example: arn:aws:iam::123456789012:role/rollstack-agent.
  • When type is google_vertex_ai
    • type (google_vertex_ai, required): Runs the slides agent on Claude models in Vertex AI, in your Google Cloud project: Claude Opus 5.5 for its main work and, if you add it in credentials.models, Claude Haiku 5.5 for its quick steps.
    • credentials (object, required): Your Google Cloud project and Vertex AI location, the models the slides agent runs on, and how Rollstack signs in: with a service account's JSON key (apiKey), or without a key, through workload identity federation (oidc).
      • When auth is apiKey
        • projectId (string, required): The ID of the Google Cloud project Rollstack calls Vertex AI in, where you enable the models in Model Garden. Use the project ID, such as acme-ai, not its name or number. Example: acme-ai.
        • region (string, required): Where Vertex AI processes the slides agent's requests: global (Vertex AI's global endpoint), us (the US multi-region) or eu (the EU multi-region). One of global, us, eu.
        • models (object, required): The Claude models the slides agent runs on: smart for its main work, fast for its quick steps. Enable them in Vertex AI's Model Garden for projectId.
          • smart (claude-opus-5-5, required): The model that runs the slides agent and does its main work, such as editing slides and writing queries. Always claude-opus-5-5 (Claude Opus 5.5): on Google Vertex AI, the slides agent runs on Claude only.
          • fast (claude-haiku-5-5): The model for the slides agent's quick steps around its main work, such as naming the chat and inspecting slides, to save cost: claude-haiku-5-5 (Claude Haiku 5.5). If omitted, claude-opus-5-5 runs these steps too.
        • auth (apiKey, required): Rollstack signs in to the provider with a secret you send in this request: an API key or, on Google Vertex AI, a service account key (clientEmail and privateKey). Rollstack saves the secret and never returns it, so to change it, send the whole setup again.
        • clientEmail (string (email), required): The email of the Google Cloud service account Rollstack signs in as: client_email in its JSON key. The service account needs the Vertex AI User role. Example: rollstack@acme-ai.iam.gserviceaccount.com.
        • privateKey (string, required): The service account's private key: private_key in its JSON key. Rollstack keeps only this and clientEmail from the key, and never returns the private key. Example: your-private-key.
      • When auth is oidc
        • projectId (string, required): The ID of the Google Cloud project Rollstack calls Vertex AI in, where you enable the models in Model Garden. Use the project ID, such as acme-ai, not its name or number. Example: acme-ai.
        • region (string, required): Where Vertex AI processes the slides agent's requests: global (Vertex AI's global endpoint), us (the US multi-region) or eu (the EU multi-region). One of global, us, eu.
        • models (object, required): The Claude models the slides agent runs on: smart for its main work, fast for its quick steps. Enable them in Vertex AI's Model Garden for projectId.
          • smart (claude-opus-5-5, required): The model that runs the slides agent and does its main work, such as editing slides and writing queries. Always claude-opus-5-5 (Claude Opus 5.5): on Google Vertex AI, the slides agent runs on Claude only.
          • fast (claude-haiku-5-5): The model for the slides agent's quick steps around its main work, such as naming the chat and inspecting slides, to save cost: claude-haiku-5-5 (Claude Haiku 5.5). If omitted, claude-opus-5-5 runs these steps too.
        • auth (oidc, required): Rollstack signs in without a saved secret: its OpenID Connect issuer signs a short-lived token for the subject rollstack:org:<id>, where <id> is your organization's id from getOrganization, and your provider exchanges the token for temporary credentials. Set up your provider to trust that issuer and to check that subject, so it accepts only your organization: setLLMProvider fails if the setup also accepts another organization's token. The AI provider setting in the app, under Settings › Features, shows the issuer, subject and audience to trust.
        • poolProjectNumber (string, required): The number of the Google Cloud project that contains the workload identity pool, as gcloud projects describe prints it. Digits only: the project number, not its ID. Example: 123456789012.
        • poolId (string, required): The ID of the workload identity pool that contains the provider in providerId, such as rollstack. Example: rollstack.
        • providerId (string, required): The ID of the OIDC provider in the pool that trusts Rollstack's issuer, such as rollstack. Map google.subject to assertion.sub, and keep Google's default audience, the provider's own resource name, which is the audience Rollstack's token carries. Grant the Vertex AI User role only to your organization's subject (see auth) in the pool. Example: rollstack.

Response 204

Success, no content