{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/usdf-fi/json-schema/usdf-fi-model-schema.json",
  "title": "Model",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/usdf-fi-openapi.json#/components/schemas/Model",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "What a request names as its model. Where router ids are on, a read with an API key names it by its author/slug id (the router API's own spelling where it lists the model, else owned_by/id); a keyless read and a signed-in session read the catalog id. Both spellings name the model in every request."
    },
    "variant": {
      "type": "string",
      "description": "private on the model's private reading (GET /v1/models/{author}/{slug}:private): its price, routes and limits are the private ones."
    },
    "object": {
      "type": "string",
      "const": "model"
    },
    "created": {
      "type": "integer"
    },
    "owned_by": {
      "type": "string"
    },
    "name": {
      "type": "string",
      "description": "The model's name as people read it."
    },
    "description": {
      "type": "string",
      "description": "One plain line: what the model does, its developer and, for a text model, its context window and output limit."
    },
    "context_length": {
      "type": "integer"
    },
    "max_output_tokens": {
      "type": "integer"
    },
    "endpoints": {
      "type": "array",
      "description": "chat, completions, embeddings, images, image_edits, transcriptions, speech, music, rerank, decisions or videos.",
      "items": {
        "type": "string"
      }
    },
    "modality": {
      "type": "string"
    },
    "unit": {
      "type": "string",
      "description": "What the price is per, for a model not priced per token."
    },
    "video": {
      "type": "object",
      "description": "A video model's: the one resolution it is sold at, and whether a request may or must carry a first frame (image), an input video (input_video) or audio (input_audio); audio says whether the clip carries sound. GET /v1/pricing has its per-second price."
    },
    "private": {
      "type": "boolean",
      "description": "A private request (provider.private, the :private suffix) is served on attested hardware now: an attested route of it is connected, in service, verified now and within its price. /v1/pricing, /v1/catalog and /v1/privacy/attestations (serving) read the same."
    },
    "private_mode": {
      "anyOf": [
        {
          "type": "string",
          "description": "What a private request (provider.private, the :private suffix, or a Private-tier key) is served on now: attested hardware; null when a private request for it is refused now (a model with no attested route, a frontier one included). zero_retention_only is no longer served (2026-10-19).",
          "enum": [
            "attested",
            "zero_retention_only"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "rate_locked_until": {
      "anyOf": [
        {
          "type": "string",
          "description": "Until when this model's rate in force is promised (the 30-day rate lock); null where the rate is not locked (rate_lock_note)."
        },
        {
          "type": "null"
        }
      ]
    },
    "rate_lock_note": {
      "type": "string",
      "description": "Present on a model whose rate is not locked, which a later price sheet may change, and on a model whose rate was raised (the sheet's `raised`): the day of the raise; the earlier sheets' promise of the lower rate ended that day."
    },
    "built_with": {
      "type": "string",
      "description": "Present on a model whose weights' licence asks a label shown where it is offered (T19): the label, such as \"Built with Llama\"."
    },
    "canonical_slug": {
      "type": "string",
      "description": "{owned_by}/{id}: the model's own path, GET /v1/models/{author}/{slug}."
    },
    "pricing": {
      "$ref": "#/$defs/RouterPricing"
    },
    "architecture": {
      "$ref": "#/$defs/ModelArchitecture"
    },
    "top_provider": {
      "type": "object",
      "description": "The route an ordinary request is served on first.",
      "properties": {
        "context_length": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "max_completion_tokens": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "is_moderated": {
          "type": "boolean",
          "description": "false: the gateway moderates nothing itself."
        }
      },
      "required": [
        "is_moderated"
      ]
    },
    "per_request_limits": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "supported_parameters": {
      "type": "array",
      "description": "The request parameters every route serving the model takes: max_tokens and max_completion_tokens (the output budget a request is held for, on every route), and of the parameters the gateway forwards (temperature, top_p, top_k, min_p, stop, seed, frequency_penalty, presence_penalty, repetition_penalty, logit_bias, logprobs, top_logprobs, tools, tool_choice, parallel_tool_calls, response_format, structured_outputs, reasoning_effort) those each route's source publishes that it takes. Empty for other models. GET /v1/models/{author}/{slug}/endpoints gives each route's.",
      "items": {
        "type": "string"
      }
    },
    "default_parameters": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "supported_voices": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "supported_formats": {
      "anyOf": [
        {
          "type": "array",
          "description": "A speech model's audio formats on every route, its default first (served when a request names none); null for other models.",
          "items": {
            "type": "string"
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "links": {
      "type": "object",
      "properties": {
        "details": {
          "type": "string",
          "description": "The model's routes: GET /v1/models/{author}/{slug}/endpoints."
        }
      },
      "required": [
        "details"
      ]
    },
    "available": {
      "type": "boolean",
      "description": "It can be called now."
    },
    "unavailable_reason": {
      "anyOf": [
        {
          "$ref": "#/$defs/UnavailableReason"
        },
        {
          "type": "null"
        }
      ]
    },
    "list_price": {
      "anyOf": [
        {
          "type": "object",
          "description": "The model's list price by the price sheet's list rule, USD per 1M tokens (or per the model's unit): its primary route's list price before any limited-time discount, read from the provider's own published prices where they have been read (its model list every five minutes, its price pages each hour). Null for a model the list rule does not price."
        },
        {
          "type": "null"
        }
      ]
    },
    "our_price": {
      "type": "object",
      "description": "What a request is charged, per class: the price sheet's price capped at list_price, never above it. pricing gives the same in USD per token."
    },
    "saving": {
      "anyOf": [
        {
          "type": "object",
          "description": "list_price less our_price.",
          "properties": {
            "per_million_input": {
              "type": "number"
            },
            "per_million_output": {
              "type": "number"
            },
            "pct": {
              "type": "number",
              "description": "The share of list saved on input and output together, in percent; 0 when charged at list."
            }
          },
          "required": [
            "per_million_input",
            "per_million_output",
            "pct"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "batch": {
      "type": "object",
      "properties": {
        "available": {
          "type": "boolean",
          "description": "A batch job can be served now."
        },
        "price": {
          "anyOf": [
            {
              "type": "object",
              "description": "The batch rates, where the model has them."
            },
            {
              "type": "null"
            }
          ]
        },
        "unavailable": {
          "type": "string",
          "description": "Why a job cannot be served now."
        },
        "provider": {
          "type": "string",
          "description": "The batch route that would serve."
        }
      },
      "required": [
        "available",
        "price"
      ]
    },
    "retention": {
      "type": "string",
      "description": "What its routes do with request content: zero (a route keeps none: zero retention is the model's default, and every request for it is served on such routes), retaining (no route keeps nothing: its routes keep it for a while, by their providers' published policies) or unverified (no route's policy is verified, which counts as keeping it).",
      "enum": [
        "zero",
        "retaining",
        "unverified"
      ]
    },
    "zdr": {
      "type": "boolean",
      "description": "true where every request for the model, sent as it is, runs only on routes whose published policy keeps no request content (retention zero): zero data retention is its default, with nothing to turn on. false where no such route serves it (may_keep_data); the model is served all the same."
    },
    "may_keep_data": {
      "type": "boolean",
      "description": "true where the model's provider may keep request data: no route of it keeps nothing (retention retaining or unverified), and a request for it as sent is served on its own routes, choosing the model being the choice (there is no opt-in). false where zero retention is its default."
    },
    "may_train": {
      "type": "boolean",
      "description": "true where the model's provider may train on request data: no route of it has a verified policy that trains on nothing. A request as sent is served on it (as a model marked may_keep_data is), unless the account's own settings deny data collection: then 409 data_collection_denied, naming the setting."
    },
    "available_by_default": {
      "type": "boolean",
      "description": "A request as sent has a route now: on a model whose retention is zero, a route that keeps nothing; on one whose provider may keep data (may_keep_data), one of its own routes that does not train on request content."
    },
    "routes": {
      "type": "array",
      "description": "Each route's data policy.",
      "items": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "description": "Foundry network, or the route's kind where it is network, private or operator; never a supplier's name.",
            "enum": [
              "Foundry network",
              "network",
              "private",
              "operator"
            ]
          },
          "private": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          },
          "retention": {
            "type": "string",
            "enum": [
              "zero",
              "retaining",
              "unverified"
            ]
          },
          "data_policy": {
            "type": "object",
            "description": "The route's published data policy: retains (and for how many days, retention_days, where the provider says), trains, zdr, tee, known, and its source."
          },
          "image_fee_tokens": {
            "type": "integer",
            "description": "On a route whose source bills each input image beside its tokens: the prompt tokens each input image of a request is billed beside its own, at the model's input rate; a request's usage and receipt count them among its prompt tokens. Absent on every other route."
          }
        },
        "required": [
          "provider",
          "retention",
          "data_policy"
        ]
      }
    },
    "source_pricing": {
      "type": "object",
      "description": "The source price, in the keys of pricing: the model maker's own API price (source_type maker), or the typical price of the model across the market where its maker publishes none (source_type market). Present, with discount_pct, source_maker, source_type and show_discount, where the model has a public price set below it.",
      "properties": {
        "prompt": {
          "type": "string",
          "description": "USD per prompt token at the source price."
        },
        "completion": {
          "type": "string",
          "description": "USD per completion token at the source price."
        },
        "cached_prompt": {
          "type": "string",
          "description": "USD per cached prompt token at the source price (its prompt rate where it states none)."
        }
      },
      "required": [
        "prompt",
        "completion",
        "cached_prompt"
      ]
    },
    "discount_pct": {
      "type": "integer",
      "description": "How far the public price (pricing) is below the source price, in whole percent: the least of the prompt, completion and cached rates' own, rounded down."
    },
    "source_maker": {
      "anyOf": [
        {
          "type": "string",
          "description": "The model maker whose own API price is the source, by name; null where the source is the market's price."
        },
        {
          "type": "null"
        }
      ]
    },
    "source_type": {
      "type": "string",
      "description": "maker: the source is the model maker's own API price; market: its maker publishes none, and the source is the model's typical price across the market.",
      "enum": [
        "maker",
        "market"
      ]
    },
    "show_discount": {
      "type": "boolean",
      "description": "Whether to show the discount: false while the source price is not current (not read in the last 7 days) or the discount is 0."
    },
    "model_page": {
      "type": "object",
      "description": "On every model of GET /v1/models and on the single-model reads of a model itself (not its private reading, not a router or an alias): what a model page shows, the context window and our price against the source price. Never a supplier's or a maker's name.",
      "properties": {
        "context_length": {
          "type": "integer",
          "description": "The model's context window, in tokens."
        },
        "unit": {
          "type": "string",
          "description": "What the prices are per: 1M tokens, or the model's own unit (an image, a second of video and the like)."
        },
        "our_price": {
          "type": "object",
          "description": "What a request is charged now, per class (input, output and the rest the model has), in USD (= USDF) per unit."
        },
        "source_price": {
          "anyOf": [
            {
              "type": "object",
              "description": "The source price for the same classes and unit: the model maker's own API price, or the market's typical price where the maker publishes none, while that price is current; otherwise the model's list price by the price sheet's list rule. null where the sheet records none."
            },
            {
              "type": "null"
            }
          ]
        },
        "source_basis": {
          "anyOf": [
            {
              "type": "string",
              "description": "What source_price is: the maker's own API price, the market's typical price, or the list price by the sheet's list rule.",
              "enum": [
                "maker",
                "market",
                "list"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "saving_pct": {
          "anyOf": [
            {
              "type": "number",
              "description": "How far our_price is below source_price on input and output together, in percent; 0 when equal; null without a source price."
            },
            {
              "type": "null"
            }
          ]
        },
        "below_source": {
          "anyOf": [
            {
              "type": "boolean",
              "description": "Whether our_price is below source_price in at least one class and above it in none; null without a source price."
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "context_length",
        "unit",
        "our_price",
        "source_price",
        "source_basis",
        "saving_pct",
        "below_source"
      ]
    },
    "virtual": {
      "type": "boolean",
      "description": "true: a model id that names a choice, not one model: an auto router or the free router (priced per request: \"-1\", or \"0\" for the free tier within its quota), or an alias of a family's newest version (alias_target)."
    },
    "alias_target": {
      "type": "object",
      "description": "For an alias: the model it names now.",
      "properties": {
        "slug": {
          "type": "string",
          "description": "The model the alias names now."
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "slug",
        "name"
      ]
    },
    "router": {
      "type": "object",
      "description": "For a router: kind (auto or free), a note, and for the free router its models."
    }
  },
  "required": [
    "id",
    "object",
    "owned_by",
    "canonical_slug",
    "architecture",
    "top_provider",
    "supported_parameters",
    "links"
  ],
  "$defs": {
    "ModelArchitecture": {
      "type": "object",
      "properties": {
        "modality": {
          "type": "string",
          "description": "Inputs and outputs, as text+image->text."
        },
        "input_modalities": {
          "type": "array",
          "description": "text, image, audio or video.",
          "items": {
            "type": "string"
          }
        },
        "output_modalities": {
          "type": "array",
          "description": "text, embeddings, image, speech, audio (music), transcription, rerank, decisions or video.",
          "items": {
            "type": "string"
          }
        },
        "tokenizer": {
          "type": "string",
          "description": "Other: the gateway does not classify tokenizers; every token count is the provider's own."
        },
        "instruct_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "modality",
        "input_modalities",
        "output_modalities"
      ]
    },
    "RouterPricing": {
      "type": "object",
      "description": "A price in USD per token, as decimal strings: the model's own on a model, the one a request served on that route is charged on an endpoint.",
      "properties": {
        "prompt": {
          "type": "string",
          "description": "USD per prompt token, as a decimal string. \"-1\" for a model priced in a unit that is not tokens (UTF-8 bytes of speech input, minutes of audio, seconds of video): its unit says which, and GET /v1/pricing gives the price."
        },
        "completion": {
          "type": "string",
          "description": "USD per completion token; \"-1\" as for prompt."
        },
        "input_cache_read": {
          "type": "string",
          "description": "USD per cached prompt token."
        },
        "cached_prompt": {
          "type": "string",
          "description": "USD per cached prompt token at the public price (the prompt rate where the model states no cached rate). Present where the model has a public price set below its maker's own."
        },
        "input_cache_write": {
          "type": "string",
          "description": "USD per prompt token written to the cache (the 5-minute write)."
        },
        "input_cache_write_1h": {
          "type": "string",
          "description": "USD per prompt token written to the cache for an hour."
        },
        "image_token": {
          "type": "string",
          "description": "USD per image input token, where it is priced apart from the rest of the prompt."
        },
        "image_output": {
          "type": "string",
          "description": "USD per output image (per image unit where the model's unit says so); such a model bills no tokens, so prompt and completion are 0."
        },
        "overrides": {
          "type": "array",
          "description": "The long-context rates: a request whose prompt is over min_prompt_tokens is billed at them, whole.",
          "items": {
            "type": "object",
            "properties": {
              "min_prompt_tokens": {
                "type": "number",
                "description": "Applies to a request whose prompt has more tokens than this."
              },
              "prompt": {
                "type": "string"
              },
              "completion": {
                "type": "string"
              },
              "input_cache_read": {
                "type": "string"
              },
              "input_cache_write": {
                "type": "string"
              },
              "input_cache_write_1h": {
                "type": "string"
              }
            },
            "required": [
              "min_prompt_tokens"
            ]
          }
        }
      },
      "required": [
        "prompt",
        "completion"
      ]
    },
    "UnavailableReason": {
      "type": "string",
      "description": "Why a listed model cannot be called now (null when it can): not_verified (listed, waiting for its first verified request), verification_failed (its latest nightly check failed), price_check (paused until it is repriced), paused (by the operator), private_only (served on attested hardware only, to a private request), terms_pending (its provider's terms are not settled), no_provider_key (its provider is not connected), no_enabled_route (no route can serve it), failing (its recent requests failed on every route; paused for a few minutes, then tried again).",
      "enum": [
        "not_verified",
        "verification_failed",
        "price_check",
        "paused",
        "private_only",
        "terms_pending",
        "no_provider_key",
        "no_enabled_route",
        "failing"
      ]
    }
  }
}