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

# Create or repoint an alias

> Point a stable name at a model — and repoint it whenever you like, with **no change to your code**.

Your application keeps calling `support-bot`; the next request after a repoint already routes to the new model. This is what makes an eval result actionable: prove a cheaper model holds up, then repoint.

**Upsert by name**, so CI can repoint idempotently without a lookup first. Owner/admin key required — repointing silently redirects live production traffic, so it's audited with the before/after.

**You are always billed for the model that RAN.** An alias is a routing decision, never a pricing one.



## OpenAPI

````yaml /openapi.json put /v1/aliases
openapi: 3.1.0
info:
  title: Omnia Management API
  description: >-
    The management API behind the improvement loop: capture and setup, request
    logs and datasets, grades (labels), judges (criteria), evals and deploy
    gates, fine-tuning and reinforcement learning, dedicated GPU endpoints, and
    model aliases and versions. Authenticated with a workspace API key
    (sk_sovereign_...). The inference API (chat, embeddings, rerank, responses)
    is OpenAI-compatible and documented separately.


    Responses are snake_case, list endpoints on the loop products use the
    {"object": "list", "data": [...]} envelope, and refusals use the same nested
    error shape the gateway emits: {"error": {"message", "type", "code"}}.
    Request bodies on the loop products (logs, labels, criteria, evals,
    datasets, aliases) are snake_case; the training and infrastructure products
    (fine-tuning, GRPO, environment tools, dedicated, model-version adoption)
    validate camelCase bodies, and each schema below says which it is. Endpoints
    that spend money require a key minted by a workspace owner or admin and
    return 403 otherwise.
  version: 1.0.0
servers:
  - url: https://gateway.omnia-voice.com
    description: Production
  - url: https://platform.omnia-voice.com/api
    description: Production (legacy alias — same API, older base URL)
security:
  - bearerAuth: []
paths:
  /v1/aliases:
    put:
      tags:
        - Model aliases
      summary: Create or repoint an alias
      description: >-
        Point a stable name at a model — and repoint it whenever you like, with
        **no change to your code**.


        Your application keeps calling `support-bot`; the next request after a
        repoint already routes to the new model. This is what makes an eval
        result actionable: prove a cheaper model holds up, then repoint.


        **Upsert by name**, so CI can repoint idempotently without a lookup
        first. Owner/admin key required — repointing silently redirects live
        production traffic, so it's audited with the before/after.


        **You are always billed for the model that RAN.** An alias is a routing
        decision, never a pricing one.
      operationId: upsertAlias
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertModelAlias'
      responses:
        '200':
          description: The alias.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelAlias'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '412':
          description: >-
            Evidence refusal: require_evidence is on and no finished, passing,
            in-window comparison proves the destination model against the
            traffic it would take over. Same status the /gate endpoint uses, so
            one pipeline handles both. Pass override_reason (at least 10
            characters) for an audited override.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UpsertModelAlias:
      type: object
      required:
        - name
        - target_model
      properties:
        name:
          type: string
          example: support-bot
          description: >-
            3–64 chars (letters, numbers, dots, dashes, underscores). Scoped to
            your workspace — a name that isn't an alias is treated as a normal
            model id, so aliases never shadow the catalog.
        target_model:
          type: string
          example: Qwen/Qwen3-32B
          description: The model requests route to. Validated against the live catalog.
        canary_model:
          type:
            - string
            - 'null'
          description: >-
            Optional. A share of requests route here instead — for a gradual
            cutover.
        canary_percent:
          type: integer
          minimum: 0
          maximum: 100
          default: 0
          description: >-
            0 = no split. 100 = full cutover. The split is per REQUEST, not per
            user.
        description:
          type:
            - string
            - 'null'
          maxLength: 200
          example: switched after eval ev_123 (90% win, -88% cost)
        gate_criterion_id:
          type:
            - string
            - 'null'
          description: >-
            Turn the canary split into a supervised rollout: the online scorer
            judges BOTH arms with this criterion and the gate decides on
            corrected-rate CI bounds. The criterion must have been aligned
            against your labels.
        gate_mode:
          type: string
          enum:
            - recommend
            - auto
          default: recommend
          description: >-
            recommend: verdicts surface on GET /v1/aliases (gate_verdict) and
            via alert notifications — you click the button. auto: the gate may
            repoint the alias itself (promote) or zero the canary (roll back),
            always audited with the numbers. Auto requires an ALIGNED criterion
            (TPR and TNR ≥ 90%): a judge may recommend with a weaker signal, but
            it doesn't get the keys.
        gate_min_samples:
          type: integer
          minimum: 10
          maximum: 1000
          default: 50
          description: >-
            No verdict of any kind until BOTH arms have this many scored
            requests.
        gate_rollback_threshold:
          type: number
          minimum: 0
          maximum: 1
          default: 0.7
          description: >-
            Roll back only when even the canary's OPTIMISTIC bound (CI upper)
            sits below this — confidently bad, not unluckily sampled.
        gate_window_hours:
          type: integer
          minimum: 1
          maximum: 720
          default: 168
          description: Scores older than this don't count toward the verdict.
        require_evidence:
          type: boolean
          description: >-
            Omitted = leave the alias's existing policy alone (a plain repoint
            can't quietly switch the policy off); false on create. With it on, a
            PUT that routes traffic to a model it isn't already reaching must be
            backed by a finished comparison in this workspace, within the last
            30 days, whose candidate win-rate CI lower bound clears 50% against
            the model traffic is leaving. Refusals are 412.
        override_reason:
          type:
            - string
            - 'null'
          description: >-
            The audited escape hatch for an evidence refusal: a written
            justification of at least 10 characters lets the repoint through and
            writes an audit event naming the actor, both models, and the reason.
            Omitted or blank is not an override.
    ModelAlias:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
          example: support-bot
          description: The name you put in `model`.
        target_model:
          type: string
          description: The model this resolves to today.
        canary_model:
          type:
            - string
            - 'null'
        canary_percent:
          type: integer
          description: 0–100. Share of requests routed to canaryModel.
        description:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        gate_criterion_id:
          type:
            - string
            - 'null'
        gate_mode:
          type: string
          enum:
            - recommend
            - auto
        gate_verdict:
          type:
            - object
            - 'null'
          description: >-
            The last gate evaluation: {decision: promote|rollback|hold, reason,
            canary: {model, rate, ci, judged}, incumbent: {...}, acted}.
        gate_verdict_at:
          type:
            - string
            - 'null'
          format: date-time
        gate_min_samples:
          type: integer
          description: >-
            No gate verdict until both canary arms have this many scored samples
            in the window.
        gate_rollback_threshold:
          type: number
          description: >-
            Roll back only when even the canary's optimistic bound (CI upper)
            sits below this corrected pass rate.
        gate_window_hours:
          type: integer
          description: Scores older than this do not count toward the verdict.
        model_version_id:
          type:
            - string
            - 'null'
          description: >-
            The model version this alias currently serves, when it points at a
            trained version (null for raw catalog models). Repoint to an older
            version to roll back.
        require_evidence:
          type: boolean
          description: >-
            Evidence policy: with this on, a repoint that would send traffic to
            an unproven model is refused with 412 unless a passing, in-window
            comparison exists (or an audited override_reason is given).
        last_evidence_run_id:
          type:
            - string
            - 'null'
          description: >-
            The eval run that authorized the current routing. Null when the
            routing predates the policy or went through as an audited override.
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
              description: >-
                invalid_request_error, insufficient_quota, rate_limit_error, or
                api_error.
            code:
              type: string
              description: >-
                Machine-stable cause, e.g. invalid_api_key, not_found,
                insufficient_permissions, precondition_failed.
          required:
            - message
            - type
            - code
      description: >-
        Every refusal — gateway and management API alike — uses this one
        envelope.
  responses:
    BadRequest:
      description: Malformed request or invalid field.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing, malformed, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: Invalid API key
              type: invalid_request_error
              code: invalid_api_key
    Forbidden:
      description: The key lacks the required owner/admin permission.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your workspace API key, e.g. `sk_sovereign_...`, sent as `Authorization:
        Bearer <key>`.

````