> ## 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.

# Add a model

> Add a model for a supported provider using forceai_params.



## OpenAPI

````yaml openapi.yaml POST /model/new
openapi: 3.1.0
info:
  title: ForceAI Gateway API
  version: 1.0.0
  description: >
    Core ForceAI Gateway operations: add a model, mint a virtual key, register
    an A2A agent, and run a chat completion. The gateway is OpenAI compatible,
    so any OpenAI SDK works by pointing base_url at it. Management operations
    (add model, add key, add agent) are admin actions on the control plane; chat
    completions run on the gateway data plane.
servers:
  - url: https://gateway.your-domain.com
    description: >-
      ForceAI endpoint (gateway for chat completions; control plane for admin
      operations)
security:
  - bearerAuth: []
tags:
  - name: Chat
    description: OpenAI-compatible inference
  - name: Models
    description: Add and manage models (admin)
  - name: Keys
    description: Mint and scope virtual keys (admin)
  - name: Agents
    description: Register A2A agents (admin)
paths:
  /model/new:
    post:
      tags:
        - Models
      summary: Add a model
      description: >
        Add a model for a provider ForceAI supports. `model_name` is the public
        name callers use; `forceai_params.model` is the upstream model ForceAI
        sends. Admin operation on the control plane; the gateway becomes able to
        route to it within about 30 seconds.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddModelRequest'
            example:
              model_name: gpt-4o
              forceai_params:
                model: openai/gpt-4o
                custom_llm_provider: openai
                api_key: sk-...
              model_info:
                mode: chat
      responses:
        '200':
          description: The created model
          content:
            application/json:
              example:
                model_name: gpt-4o
                model_info:
                  id: 504f9647-...
                  mode: chat
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    AddModelRequest:
      type: object
      required:
        - model_name
        - forceai_params
      properties:
        model_name:
          type: string
          description: Public name callers pass as `model`.
          example: gpt-4o
        forceai_params:
          $ref: '#/components/schemas/ForceaiParams'
        model_info:
          type: object
          properties:
            mode:
              type: string
              example: chat
    ForceaiParams:
      type: object
      description: >
        Provider or backend configuration. `forceai_params` is the
        customer-facing name; `litellm_params` is accepted as a back-compat
        alias.
      required:
        - model
      properties:
        model:
          type: string
          example: openai/gpt-4o
        custom_llm_provider:
          type: string
          example: openai
        api_key:
          type: string
        api_base:
          type: string
      additionalProperties: true
  responses:
    Unauthorized:
      description: Missing or invalid key
      content:
        application/json:
          example:
            error:
              message: Authentication Error, No api key passed in.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A ForceAI virtual key or the master key, sent as `Authorization: Bearer
        <key>`.

````