Skip to main content
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

1

Open Add Model

Go to Models + Endpoints -> Add Model
2

Pick the provider

Choose the provider from the dropdown. The credential fields below update to match it
3

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
4

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
5

Save

The model is created on the control plane immediately and becomes routable on the gateway within about 30 seconds (see Propagation)

By API

Both cases hit one endpoint on the control plane
The body has three top-level keys. Inside forceai_params, only model is required

Fields

string
required
The public name callers pass as model to the gateway
string
required
The upstream identifier ForceAI sends, in provider/model form, for example openai/gpt-4o
string
The provider slug. Usually inferred from the model prefix
string
The provider API key. Optional only when the provider needs none
string
Optional. Set for self-hosted, Azure, or proxy endpoints
string
Optional. chat, embedding, completion, and so on
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

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:
To make the model callable by a specific consumer, issue a virtual key scoped to it; see the Smart Router guide for the key model