> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gitar.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Bring Your Own Model

> Serve Gitar's LLM calls from your own account, through Anthropic, AWS Bedrock, or your gateway

export const ThemeImage = ({src, alt, width}) => {
  let lightSrc, darkSrc;
  if (src.includes("-light.")) {
    lightSrc = src;
    darkSrc = src.replace("-light.", "-dark.");
  } else if (src.includes("-dark.")) {
    darkSrc = src;
    lightSrc = src.replace("-dark.", "-light.");
  } else {
    lightSrc = src;
    darkSrc = src;
  }
  const style = width ? {
    maxWidth: width,
    marginInline: "auto"
  } : undefined;
  return <span>
      <img className="block dark:hidden rounded-lg border" src={lightSrc} alt={alt} style={style} />
      <img className="hidden dark:block rounded-lg border" src={darkSrc} alt={alt} style={style} />
    </span>;
};

Gitar can run every LLM call for your organization on your account instead of ours. Your provider agreement, your data boundary, your bill.

Gitar still chooses the model for each task. You choose the account those calls are served from, and where they run.

<Note>
  Bring Your Own Model is available on the Enterprise plan. An organization admin sets it up under **Settings -> Configuration -> Bring Your Own Model**.
</Note>

## Choosing an option

| Option          | Reach for it when                                                          | What you supply                   |
| --------------- | -------------------------------------------------------------------------- | --------------------------------- |
| **Anthropic**   | You already buy Anthropic capacity and want the calls on your account      | An API key                        |
| **AWS Bedrock** | Residency or compliance requires inference to stay in a geography you name | An IAM role and a geography       |
| **LiteLLM**     | You run your own proxy and want Gitar's traffic to pass through it         | Your host and a virtual key       |
| **Portkey**     | Portkey is already your gateway for observability, budgets, or routing     | An API key and your provider slug |
| **OpenRouter**  | You want one bill and no infrastructure of your own                        | An API key                        |

One option serves traffic at a time. Switching keeps the credential the previous option used, so moving between them and back does not mean re-entering keys.

Gitar never asks you to name a model. The three tiers it routes between are resolved per request, so a model upgrade reaches you with a Gitar deploy rather than a settings change on your side.

## Anthropic

Paste an API key. Gitar stores it encrypted and calls `api.anthropic.com` with it.

The key needs access to Opus, Sonnet, and Haiku. Verification tells you if a workspace restriction is in the way.

## AWS Bedrock

Bedrock is the option to pick when a compliance requirement says where inference may run. Gitar assumes a role in your account per request through AWS STS, so no standing credential of yours is ever stored with us.

<Steps>
  <Step title="Pick your residency geography">
    Gitar routes to a geographic inference profile, so requests stay inside that geography's regions on the AWS backbone.

    | Geography      | Regions AWS may route within                        |
    | -------------- | --------------------------------------------------- |
    | United States  | us-east-1, us-east-2, us-west-2                     |
    | European Union | 6 EU regions, entering at eu-central-1              |
    | Australia      | ap-southeast-2 (Sydney), ap-southeast-4 (Melbourne) |
    | Japan          | ap-northeast-1 (Tokyo), ap-northeast-3 (Osaka)      |

    Your service control policies have to allow every region in the geography, since a request may land in any of them.
  </Step>

  <Step title="Create the role in AWS">
    Open **Create the role in AWS** in the card. It carries your external ID and both policies to copy, and it stays available afterwards for whenever you rebuild the role or audit who can assume it.

    The role's name has to start with `gitar-bedrock-`. Gitar's permission to assume roles is scoped to that prefix, so a role named anything else cannot be assumed however its trust policy reads.

    The external ID is fixed for your organization and never changes. It is not a secret, but the role must require it. That condition is what stops anyone else who learns your role ARN from asking Gitar to assume it.
  </Step>

  <Step title="Enable Anthropic model access">
    In your Bedrock console, enable Anthropic model access for the geography's regions. Listing models is not the same as being allowed to call them, which is what verification checks.
  </Step>

  <Step title="Paste the role ARN and verify">
    Paste the ARN into the card and verify the connection.
  </Step>
</Steps>

### Global cross-region inference

Off by default. Global inference routes worldwide, including outside your geography, so turn it on only if throughput matters more than residency. With it off, a model your geography cannot serve fails rather than leaving the geography.

## Gateways

LiteLLM, Portkey, and OpenRouter are configured the same way: the endpoint, and a credential for it. Gitar speaks the Anthropic Messages format to all three.

|            | LiteLLM     | Portkey            | OpenRouter           |
| ---------- | ----------- | ------------------ | -------------------- |
| Host       | Yours       | Hosted by Portkey  | Hosted by OpenRouter |
| Credential | Virtual key | API key            | API key              |
| Also needs |             | Your provider slug |                      |

Nothing else is asked of you. Which header the key rides in, what path your gateway serves, and what its catalog calls each model are all Gitar's to know.

### LiteLLM

Enter the `https://` origin your proxy serves on, no path, plus a virtual key. Gitar uses your proxy's Anthropic passthrough route, so nothing in your `config.yaml` has to be named here.

A proxy that is not reachable from the public internet needs [network access](/connecting-code/network-access) arranged first.

### Portkey

Enter your Portkey API key and the provider slug you want the traffic routed through. The slug is the name you gave the integration in Portkey.

<Note>
  A slug routes to whichever provider you wired up behind it, so the models Gitar needs have to be reachable through that provider. Verification calls each one and names any that are not.
</Note>

### OpenRouter

Enter an API key. Nothing else, since OpenRouter hosts the endpoint and Gitar knows its catalog's name for each model.

OpenRouter is a broker rather than a boundary. If you are here for a data-residency requirement, Bedrock is the option that enforces one.

### Something else

Running a gateway that is not listed? [Contact support](mailto:support@gitar.ai?subject=BYO%20LLM%20gateway). The endpoint is what we certify, so a gateway speaking Anthropic passthrough is usually a short conversation.

## Verifying

Every option is verified the same way, and **Save stays disabled until verification passes**. Gitar sends one tiny request per model it needs, from your account, and reports what came back for each.

| Row says        | What it means                                                                                                        |
| --------------- | -------------------------------------------------------------------------------------------------------------------- |
| **Answered**    | The model exists and this credential may call it                                                                     |
| **Refused**     | Reached it, and the call was denied. Model access is not enabled for it, or the credential is not allowed to call it |
| **Not offered** | The endpoint does not carry this model: a geography without it, or a gateway routing to a catalog that lacks it      |
| **No answer**   | Throttled, or a transient fault. Nothing to change. Verify again                                                     |

A request is what gets verified, on purpose. Every provider has a cheaper check that passes when real traffic would not.

Bedrock lists inference profiles whether or not you enabled model access. A gateway resolves a model name against a catalog rather than against your key. A key can be valid while scoped to a workspace missing a model.

Editing any field after a pass clears it, so what you save is what was proven.

## After it is live

Gitar re-checks the configuration in the background and shows a card on your dashboard when your account stops serving. Reviews are held rather than quietly routed back through Gitar's account, so nothing leaves your boundary without you choosing it.

| Card                                        | What to do                                                                                                                 |
| ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| **Permission Denied**                       | Your credential was refused. For Bedrock, check the trust policy still names Gitar's principal and that model access is on |
| **Configuration Cannot Serve Traffic**      | Your geography carries no model Gitar can use. Pick another geography, or allow global inference                           |
| **Spend Limit Reached** / **Billing Issue** | Raise the limit or settle the balance with your provider, then use **Retry**                                               |

Held work resumes on its own once the configuration serves again.

## What Gitar stores

An Anthropic or gateway credential is encrypted in AWS Secrets Manager, and the configuration keeps only the name of that secret. A Bedrock configuration stores no credential at all: the role ARN, geography, and external ID are all non-secret, and the credential is minted per request by STS.

**Clear** removes the configuration and every credential stored with it, and returns your organization to Gitar's own account.
