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

# Onboard an existing provider

> Add a model for a provider ForceAI already supports, in the dashboard or one API call. No code.

ForceAI ships support for OpenAI, Anthropic, Azure, Bedrock, Vertex, and many more. Adding one of their models is a config action, not a code change: you map a public model name that callers use to the upstream model ForceAI calls, and supply credentials

## In the dashboard

<Steps>
  <Step title="Open Add Model">
    Go to **Models + Endpoints -> Add Model**
  </Step>

  <Step title="Pick the provider">
    Choose the provider from the dropdown. The credential fields below update to match it
  </Step>

  <Step title="Name the model">
    Set the ForceAI Model Name (the upstream model, for example `gpt-4o`) and one or more Public Model Name mappings. The public name is what your callers pass as `model`; the ForceAI model name is what the gateway sends upstream
  </Step>

  <Step title="Add credentials">
    Enter the provider API key, and an API base if the provider needs one (self-hosted or proxy endpoints). Optionally set the Mode (chat, embedding, and so on) and reuse a saved credential instead of typing a key
  </Step>

  <Step title="Save">
    The model is created on the control plane immediately and becomes routable on the gateway within about 30 seconds (see [Propagation](#propagation))
  </Step>
</Steps>

## By API

Both cases hit one endpoint on the control plane

```
POST {control_plane}/model/new
Authorization: Bearer <admin-key>
Content-Type: application/json
```

The body has three top-level keys. Inside `forceai_params`, only `model` is required

<CodeGroup>
  ```bash OpenAI theme={null}
  curl -X POST https://YOUR_CONTROL_PLANE/model/new \
    -H "Authorization: Bearer $ADMIN_KEY" -H "Content-Type: application/json" \
    -d '{
      "model_name": "gpt-4o",
      "forceai_params": {
        "model": "openai/gpt-4o",
        "custom_llm_provider": "openai",
        "api_key": "sk-..."
      },
      "model_info": { "mode": "chat" }
    }'
  ```

  ```bash Anthropic theme={null}
  curl -X POST https://YOUR_CONTROL_PLANE/model/new \
    -H "Authorization: Bearer $ADMIN_KEY" -H "Content-Type: application/json" \
    -d '{
      "model_name": "claude-sonnet",
      "forceai_params": {
        "model": "anthropic/claude-3-5-sonnet-20241022",
        "custom_llm_provider": "anthropic",
        "api_key": "sk-ant-..."
      },
      "model_info": { "mode": "chat" }
    }'
  ```
</CodeGroup>

### Fields

<ParamField path="model_name" type="string" required>
  The public name callers pass as `model` to the gateway
</ParamField>

<ParamField path="forceai_params.model" type="string" required>
  The upstream identifier ForceAI sends, in `provider/model` form, for example `openai/gpt-4o`
</ParamField>

<ParamField path="forceai_params.custom_llm_provider" type="string">
  The provider slug. Usually inferred from the `model` prefix
</ParamField>

<ParamField path="forceai_params.api_key" type="string">
  The provider API key. Optional only when the provider needs none
</ParamField>

<ParamField path="forceai_params.api_base" type="string">
  Optional. Set for self-hosted, Azure, or proxy endpoints
</ParamField>

<ParamField path="model_info.mode" type="string">
  Optional. `chat`, `embedding`, `completion`, and so on
</ParamField>

<Note>
  Adding models by API requires the control plane to persist models to its database (`STORE_MODEL_IN_DB=True`). The default ForceAI deployment already sets this
</Note>

## Selecting many models at once

In the dashboard, selecting several models under one provider creates one deployment per model, each its own `POST /model/new`. To do that by API, send one request per model

## Propagation

`/model/new` runs on the control plane, which stores the model right away. The gateway (data plane) refreshes its deployments from the shared database on a background interval of about 30 seconds, so a newly added model is routable within roughly 15 seconds on average, 30 at worst. If a call returns "Invalid model name" immediately after adding it, wait for the next refresh; it is propagation lag, not a broken model

## Verify

Once it has propagated, call it like any model:

```bash theme={null}
curl -X POST https://YOUR_GATEWAY_DOMAIN/v1/chat/completions \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o","messages":[{"role":"user","content":"ping"}]}'
```

To make the model callable by a specific consumer, issue a virtual key scoped to it; see the [Smart Router guide](/agents/overview) for the key model
