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

# Create configured model



## OpenAPI

````yaml /api-reference/openapi.yaml post /orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/models
openapi: 3.1.2
info:
  title: Omnara API
  version: 0.1.0
  description: Public HTTP API contract for Omnara.
servers:
  - url: https://api.omnara.com/v1
    description: Hosted Omnara
security:
  - bearerAuth: []
  - browserSessionCookie: []
tags:
  - name: Agents
    description: >-
      Launch agents, send inputs, manage the input backlog, and work with tool
      calls.
    externalDocs:
      description: Guide
      url: https://docs.omnara.com/agents/overview
  - name: Interactions
    description: List and resolve the approvals and questions that pause an agent.
    externalDocs:
      description: Guide
      url: https://docs.omnara.com/events/interactions
  - name: Actors
    description: Attribute agent inputs and interaction responses to external users.
    externalDocs:
      description: Guide
      url: >-
        https://docs.omnara.com/events/sending-input#who-said-that-actors-and-attribution
  - name: Events
    description: Read or stream the agent timeline, list turns, and download artifacts.
    externalDocs:
      description: Guide
      url: https://docs.omnara.com/events/streaming
  - name: Configs and Profiles
    description: >-
      Create agent configs, manage reusable launch profiles, and set up
      integrations.
    externalDocs:
      description: Guide
      url: https://docs.omnara.com/agents/configuration
  - name: Models
    description: Configure model providers and models, and grant projects access to them.
    externalDocs:
      description: Guide
      url: https://docs.omnara.com/organization/model-providers
  - name: Machines
    description: Register machines, control project access, and manage daemon tokens.
    externalDocs:
      description: Guide
      url: https://docs.omnara.com/machines/connect
  - name: Machine Pools
    description: Define machine pools and grant projects access to them.
    externalDocs:
      description: Guide
      url: https://docs.omnara.com/machines/pools
  - name: Secrets
    description: >-
      Manage secret ownership and versions, and inspect or grant project
      availability.
    externalDocs:
      description: Guide
      url: https://docs.omnara.com/organization/secrets
  - name: Skills
    description: Manage versioned skill ownership and load skill instructions on demand.
    externalDocs:
      description: Guide
      url: https://docs.omnara.com/tools/skills
  - name: Organizations and Projects
    description: Create organizations and projects and manage membership.
    externalDocs:
      description: Guide
      url: https://docs.omnara.com/organization/members
  - name: Users and API Keys
    description: >-
      The authenticated user, personal and organization API keys, and
      invitations.
    externalDocs:
      description: Guide
      url: https://docs.omnara.com/api/authentication
  - name: Machine Daemon
    description: Routes the Omnara machine daemon uses to connect a machine.
paths:
  /orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/models:
    parameters:
      - name: orgID
        in: path
        required: true
        schema:
          type: string
          pattern: ^org_[a-z2-7]{26}$
      - name: modelProviderConfigID
        in: path
        required: true
        schema:
          type: string
          pattern: ^mpc_[a-z2-7]{26}$
    post:
      tags:
        - Models
      summary: Create configured model
      operationId: createConfiguredModel
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConfiguredModelRequest'
      responses:
        '200':
          description: Route response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfiguredModel'
        '201':
          description: Created route response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfiguredModel'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        4XX:
          $ref: '#/components/responses/ClientError'
        5XX:
          $ref: '#/components/responses/ServerError'
      security:
        - bearerAuth: []
        - browserSessionCookie: []
          csrfHeader: []
components:
  schemas:
    CreateConfiguredModelRequest:
      type: object
      additionalProperties: false
      required:
        - name
        - provider_model_slug
        - context_window_tokens
      properties:
        name:
          $ref: '#/components/schemas/ResourceName'
          description: >-
            User-assigned configured model name used by agent YAML as
            model.name. Names are unique within an active model provider config
            and can be renamed without changing existing agents.
        provider_model_slug:
          type: string
          minLength: 1
          description: Exact provider model slug sent to the provider endpoint.
        context_window_tokens:
          type: integer
          minimum: 2
          maximum: 2147483647
          description: Total token window for this model, including input and output.
        max_output_tokens:
          type: integer
          minimum: 1
          maximum: 2147483647
          description: >-
            Optional configured output-token ceiling. When omitted, Omnara
            stores the smaller of 8,192 tokens and half the context window. It
            must not exceed the provider's supported limit. Omnara uses it for
            request validation and context budgeting.
        default_max_output_tokens:
          type: integer
          minimum: 1
          maximum: 2147483647
          description: >-
            Optional normal per-request output-token cap. When omitted, Omnara
            stores the smaller of 4,096 tokens and max_output_tokens.
        default_cache_retention:
          $ref: '#/components/schemas/ModelCacheRetention'
        supports_tools:
          type: boolean
          description: >-
            Whether this configured model can receive tool definitions and emit
            tool calls. Agent configs with enabled tools are rejected when this
            is false.
          default: true
        supports_reasoning:
          type: boolean
          description: >-
            Whether Omnara should use this model's reasoning features. For
            OpenAI Responses, this also enables encrypted reasoning replay for
            stateless calls.
          default: false
        default_reasoning_effort:
          type: string
          description: >-
            Default reasoning effort to send for models/API formats that support
            effort-style reasoning controls. Requires supports_reasoning=true.
            When supported_reasoning_efforts is present, this value must be
            listed there.
        supported_reasoning_efforts:
          type: array
          description: >-
            Reasoning effort values this configured model accepts. Requires
            supports_reasoning=true when non-empty.
          items:
            type: string
        input_modalities:
          type: array
          description: >-
            Input types this configured model accepts. Omnara recognizes text,
            image, and file; an empty list leaves capabilities unspecified.
          items:
            type: string
        output_modalities:
          type: array
          description: >-
            Output types this configured model can return. Omnara currently
            consumes text output.
          items:
            type: string
        api_variant_options:
          $ref: '#/components/schemas/ModelAPIVariantOptions'
    ConfiguredModel:
      type: object
      additionalProperties: false
      required:
        - id
        - org_id
        - model_provider_config_id
        - management_kind
        - name
        - current_revision_id
        - provider_model_slug
        - context_window_tokens
        - max_output_tokens
        - default_cache_retention
        - supports_tools
        - supports_reasoning
        - default_reasoning_effort
        - supported_reasoning_efforts
        - input_modalities
        - output_modalities
        - api_variant_options
        - created_at
        - updated_at
        - revision_created_at
      properties:
        id:
          $ref: '#/components/schemas/ConfiguredModelID'
        org_id:
          $ref: '#/components/schemas/OrganizationID'
        model_provider_config_id:
          $ref: '#/components/schemas/ModelProviderConfigID'
        management_kind:
          $ref: '#/components/schemas/ManagementKind'
        name:
          $ref: '#/components/schemas/ResourceName'
          description: >-
            User-assigned configured model name used by agent YAML as
            model.name.
        current_revision_id:
          $ref: '#/components/schemas/ConfiguredModelRevisionID'
        provider_model_slug:
          type: string
          description: >-
            Exact provider model slug sent to the provider endpoint by the
            current revision.
        context_window_tokens:
          type: integer
          description: Total token window for this model, including input and output.
        max_output_tokens:
          type: integer
          description: Configured output-token ceiling for this model.
        default_max_output_tokens:
          type:
            - integer
            - 'null'
          description: >-
            Default per-request output-token cap sent to the provider unless an
            agent config overrides it.
        default_cache_retention:
          $ref: '#/components/schemas/ModelCacheRetention'
        supports_tools:
          type: boolean
          description: >-
            Whether this configured model can receive tool definitions and emit
            tool calls.
        supports_reasoning:
          type: boolean
          description: Whether Omnara should use this model's reasoning features.
        default_reasoning_effort:
          type: string
          description: >-
            Default reasoning effort to send for models/API formats that support
            effort-style reasoning controls.
        supported_reasoning_efforts:
          type: array
          description: Reasoning effort values this configured model accepts.
          items:
            type: string
        input_modalities:
          type: array
          description: >-
            Input types this configured model accepts. Omnara recognizes text,
            image, and file; an empty list leaves capabilities unspecified.
          items:
            type: string
        output_modalities:
          type: array
          description: Output types this configured model can return.
          items:
            type: string
        api_variant_options:
          $ref: '#/components/schemas/ModelAPIVariantOptions'
        created_at:
          $ref: '#/components/schemas/Timestamp'
        updated_at:
          $ref: '#/components/schemas/Timestamp'
        revision_created_at:
          $ref: '#/components/schemas/Timestamp'
    ResourceName:
      type: string
      minLength: 1
      maxLength: 64
      x-omnara-unicode-normalization: NFC
      description: >-
        Human-readable name. Spaces and punctuation are allowed; leading or
        trailing whitespace and invisible or control characters are not.
    ModelCacheRetention:
      type: string
      description: >-
        Default prompt-cache hint for model requests. `none` means Omnara does
        not send a cache hint; providers may still apply their own automatic
        caching. `short` and `long` are translated to the closest supported
        control for the selected API.
      enum:
        - none
        - short
        - long
    ModelAPIVariantOptions:
      type: object
      x-go-type: json.RawMessage
      x-go-type-skip-optional-pointer: true
      description: >-
        Extra top-level JSON fields to include in provider requests for this
        configured model. Use this for provider-specific settings that Omnara
        does not expose as typed fields, such as OpenRouter `provider` routing
        or sampling parameters. Omnara still controls the fields it needs to run
        the agent correctly, including the model, prompt/messages, streaming,
        tools, output-token limit, and selected reasoning policy. Provider
        passthrough values for those fields are ignored. For OpenRouter routing
        options, see
        https://openrouter.ai/docs/guides/routing/provider-selection and general
        request parameters at
        https://openrouter.ai/docs/api/reference/parameters.
      additionalProperties: true
    ConfiguredModelID:
      type: string
      pattern: ^mdl_[a-z2-7]{26}$
    OrganizationID:
      type: string
      pattern: ^org_[a-z2-7]{26}$
    ModelProviderConfigID:
      type: string
      pattern: ^mpc_[a-z2-7]{26}$
    ManagementKind:
      type: string
      description: >-
        Lifecycle owner. Tenant-managed resources can be changed through tenant
        APIs. Cluster-managed resources are installed and lifecycle-managed by
        the control plane; individual APIs may explicitly expose tenant-editable
        settings.
      enum:
        - tenant
        - cluster
    ConfiguredModelRevisionID:
      type: string
      pattern: ^mrev_[a-z2-7]{26}$
    Timestamp:
      type: string
      format: date-time
    Error:
      type: object
      additionalProperties: false
      required:
        - error
        - code
      properties:
        error:
          type: string
          description: Human-readable error message. Do not match on it programmatically.
        code:
          type: string
          description: Stable error code for programmatic handling.
          enum:
            - invalid_request
            - unauthorized
            - forbidden
            - not_found
            - conflict
            - gone
            - request_too_large
            - unsupported_media_type
            - unprocessable
            - rate_limited
            - internal_error
            - upstream_error
            - service_unavailable
            - idempotency_key_conflict
            - state_transition_conflict
            - managed_work_admission_denied
            - pending_work
            - not_wake_capable
            - daemon_runtime_unregistered
            - validation_failed
            - csrf_check_failed
            - authentication_unavailable
    ClientErrorCode:
      type: string
      description: >-
        Stable error code carried by 4XX statuses. Subset of the Error code enum
        whose statuses are client errors.
      enum:
        - invalid_request
        - validation_failed
        - unauthorized
        - forbidden
        - csrf_check_failed
        - not_found
        - conflict
        - idempotency_key_conflict
        - state_transition_conflict
        - pending_work
        - not_wake_capable
        - gone
        - daemon_runtime_unregistered
        - request_too_large
        - unsupported_media_type
        - unprocessable
        - rate_limited
    ServerErrorCode:
      type: string
      description: >-
        Stable error code carried by 5XX statuses. Subset of the Error code enum
        whose statuses are server errors.
      enum:
        - internal_error
        - upstream_error
        - service_unavailable
        - authentication_unavailable
  responses:
    BadRequest:
      description: The request was invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication is required or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The authenticated principal is not authorized.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found or is not visible.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: >-
        The request conflicts with current resource state or idempotency
        history.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServiceUnavailable:
      description: The service dependency required to satisfy the request is unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ClientError:
      description: >-
        Any other client error. The body carries the shared Error envelope
        restricted to client error codes; statuses with a dedicated response
        above are documented precisely.
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
            required:
              - error
              - code
            properties:
              error:
                type: string
                description: >-
                  Human-readable error message. Do not match on it
                  programmatically.
              code:
                $ref: '#/components/schemas/ClientErrorCode'
    ServerError:
      description: >-
        Any other server error. The body carries the shared Error envelope
        restricted to server error codes.
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
            required:
              - error
              - code
            properties:
              error:
                type: string
                description: >-
                  Human-readable error message. Do not match on it
                  programmatically.
              code:
                $ref: '#/components/schemas/ServerErrorCode'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Omnara personal or organization access token
      description: An opaque Omnara personal or organization bearer token.
    browserSessionCookie:
      type: apiKey
      in: cookie
      name: __Host-omnara_session
      description: >-
        Browser session cookie. HTTPS deployments use __Host-omnara_session;
        local HTTP development uses omnara_session.
    csrfHeader:
      type: apiKey
      in: header
      name: X-Omnara-Csrf
      description: >-
        CSRF token header required for browser-session mutations. The value must
        match the session's CSRF cookie.

````