Morse · Schema

ChatCompletionRequest

Of the fields below, all but provider reach the model, and temperature, top_p, stop, seed, n, and response_format reach it only from an API key whose forward_settings is on ("Let my settings reach the model host" on the key in the developer console, https://console.trymorse.ai/keys). A new key has it on unless POST /v1/keys sends forward_settings false or null, and the console or PATCH /v1/keys/{id} turns it off or on. A key with forward_settings off is refused any of those fields with 400 setting_not_forwarded, which names the field, before Morse calls the model or holds any credit; a null value counts as absent. A response_format of {"type":"text"} or null counts as absent. A response_format of type json_object or json_schema reaches only the hosts of the model whose Morse endpoint records that it honours that type, and Morse picks one of them; when none of the model's endpoints does, it is refused with 400 unsupported_parameter, which names response_format and the type. A field that changes the reply and that Morse sends to no model, such as logprobs, top_logprobs, logit_bias, frequency_penalty, presence_penalty, top_k, min_p, repetition_penalty, modalities, audio, prediction, verbosity, or web_search_options, is refused with 400 unsupported_parameter, which names it, unless its value changes nothing (false, 0, null, an empty object, or modalities ["text"]). Morse drops every other field without an error, such as user, metadata, store, service_tier, safety_identifier, or prompt_cache_key. A chat from the Morse app is sent none of these fields and is refused none of them. An E2EE model is sent the body as it was encrypted, under its own rules.

CompanyArtificial IntelligencePrivate InferenceSecurityOpenAI-Compatible

Properties

Name Type Description
model string A chat model's id from GET /v1/models.
messages array The conversation, at least one message. An empty or missing messages is refused with 400 invalid_parameter naming messages, before Morse calls the model or holds any credit.
stream boolean Send the reply as server-sent events.
stream_options object
max_completion_tokens integernull The most output tokens the model may produce. The limit is the max_output_tokens of the tier that serves the request, as GET /v1/models lists it under tiers, and a model's tiers can differ: Kimi K3.1
max_tokens integernull The same as max_completion_tokens. Below e2ee, when both are set, max_completion_tokens wins; at e2ee they must be equal.
reasoning_effort string How much a reasoning model reasons, such as low, medium, or high. Morse sends the nearest effort the model takes, listed as the model's reasoning_efforts in GET /v1/models: the lowest listed effort at
tools array
tool_choice object auto, none, required, or one named function.
parallel_tool_calls boolean
temperature numbernull Sent to the model only from an API key whose forward_settings is on. Any other key is refused with 400 setting_not_forwarded.
top_p numbernull Sent to the model only from an API key whose forward_settings is on. Any other key is refused with 400 setting_not_forwarded.
stop object Up to 4 strings the model stops before. Sent to the model only from an API key whose forward_settings is on. Any other key is refused with 400 setting_not_forwarded.
seed integernull Sent to the model only from an API key whose forward_settings is on. Any other key is refused with 400 setting_not_forwarded. Whether the same seed gives the same reply is up to the model's host.
n integernull 1 only: Morse returns one choice. Any other value is refused with 400 invalid_parameter. 1 is sent to the model only from an API key whose forward_settings is on, and any other key is refused it with
response_format objectnull JSON mode: {"type":"json_object"} or {"type":"json_schema","json_schema":{...}}, sent to the model as given. {"type":"text"} or null counts as absent, and any other type is refused with 400 invalid_pa
provider object Conditions on the model that serves the request. Morse checks them itself and never sends this object to the model's provider, except in an E2EE request body, which Morse forwards as sent. Morse choos
View JSON Schema on GitHub

JSON Schema

trymorse-ai-chat-completion-request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trymorse-ai/json-schema/trymorse-ai-chat-completion-request-schema.json",
  "title": "ChatCompletionRequest",
  "description": "Of the fields below, all but provider reach the model, and temperature, top_p, stop, seed, n, and response_format reach it only from an API key whose forward_settings is on (\"Let my settings reach the model host\" on the key in the developer console, https://console.trymorse.ai/keys). A new key has it on unless POST /v1/keys sends forward_settings false or null, and the console or PATCH /v1/keys/{id} turns it off or on. A key with forward_settings off is refused any of those fields with 400 setting_not_forwarded, which names the field, before Morse calls the model or holds any credit; a null value counts as absent. A response_format of {\"type\":\"text\"} or null counts as absent. A response_format of type json_object or json_schema reaches only the hosts of the model whose Morse endpoint records that it honours that type, and Morse picks one of them; when none of the model's endpoints does, it is refused with 400 unsupported_parameter, which names response_format and the type. A field that changes the reply and that Morse sends to no model, such as logprobs, top_logprobs, logit_bias, frequency_penalty, presence_penalty, top_k, min_p, repetition_penalty, modalities, audio, prediction, verbosity, or web_search_options, is refused with 400 unsupported_parameter, which names it, unless its value changes nothing (false, 0, null, an empty object, or modalities [\"text\"]). Morse drops every other field without an error, such as user, metadata, store, service_tier, safety_identifier, or prompt_cache_key. A chat from the Morse app is sent none of these fields and is refused none of them. An E2EE model is sent the body as it was encrypted, under its own rules.",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trymorse-ai-openapi.json#/components/schemas/ChatCompletionRequest",
  "type": "object",
  "required": [
    "model",
    "messages"
  ],
  "properties": {
    "model": {
      "type": "string",
      "minLength": 1,
      "description": "A chat model's id from GET /v1/models."
    },
    "messages": {
      "type": "array",
      "minItems": 1,
      "maxItems": 4096,
      "description": "The conversation, at least one message. An empty or missing messages is refused with 400 invalid_parameter naming messages, before Morse calls the model or holds any credit.",
      "items": {
        "$ref": "#/$defs/ChatMessage"
      }
    },
    "stream": {
      "type": "boolean",
      "default": false,
      "description": "Send the reply as server-sent events."
    },
    "stream_options": {
      "type": "object",
      "properties": {
        "include_usage": {
          "type": "boolean",
          "default": false,
          "description": "Send a last chunk with usage and an empty choices array before [DONE]. Without it, the stream carries no usage."
        }
      }
    },
    "max_completion_tokens": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1,
      "description": "The most output tokens the model may produce. The limit is the max_output_tokens of the tier that serves the request, as GET /v1/models lists it under tiers, and a model's tiers can differ: Kimi K3.1 Pro allows 1,048,576 at private and 262,144 at e2ee. Below e2ee, Morse lowers a value above that tier's max_output_tokens to it. An E2EE request's body is forwarded as sent, so one above the e2ee tier's max_output_tokens, or with max_tokens and max_completion_tokens both set and unequal, is refused with 400 e2ee_output_limit_refused. Below e2ee, when neither limit is set, the model's default applies; an E2EE request that sets neither is refused with 400 e2ee_output_limit_required. The account must hold credit for the most the request could cost, so a lower limit holds less credit."
    },
    "max_tokens": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1,
      "description": "The same as max_completion_tokens. Below e2ee, when both are set, max_completion_tokens wins; at e2ee they must be equal."
    },
    "reasoning_effort": {
      "type": "string",
      "enum": [
        "none",
        "minimal",
        "low",
        "medium",
        "high",
        "xhigh",
        "max"
      ],
      "description": "How much a reasoning model reasons, such as low, medium, or high. Morse sends the nearest effort the model takes, listed as the model's reasoning_efforts in GET /v1/models: the lowest listed effort at or above the one asked for, or the highest listed. A model whose reasoning_efforts is empty is sent no reasoning_effort. Any value other than none, minimal, low, medium, high, xhigh, or max is refused with 400 invalid_parameter. When reasoning_effort is absent, the model's default applies. An E2EE model is sent the body as it was encrypted, so on one the client picks from reasoning_efforts itself."
    },
    "tools": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tool"
      }
    },
    "tool_choice": {
      "description": "auto, none, required, or one named function.",
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "auto",
            "none",
            "required"
          ]
        },
        {
          "type": "object",
          "required": [
            "type",
            "function"
          ],
          "properties": {
            "type": {
              "const": "function"
            },
            "function": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "name": {
                  "type": "string"
                }
              }
            }
          }
        }
      ]
    },
    "parallel_tool_calls": {
      "type": "boolean"
    },
    "temperature": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0,
      "maximum": 2,
      "description": "Sent to the model only from an API key whose forward_settings is on. Any other key is refused with 400 setting_not_forwarded."
    },
    "top_p": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0,
      "maximum": 1,
      "description": "Sent to the model only from an API key whose forward_settings is on. Any other key is refused with 400 setting_not_forwarded."
    },
    "stop": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "maxItems": 4,
          "items": {
            "type": "string"
          }
        },
        {
          "type": "null"
        }
      ],
      "description": "Up to 4 strings the model stops before. Sent to the model only from an API key whose forward_settings is on. Any other key is refused with 400 setting_not_forwarded."
    },
    "seed": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Sent to the model only from an API key whose forward_settings is on. Any other key is refused with 400 setting_not_forwarded. Whether the same seed gives the same reply is up to the model's host."
    },
    "n": {
      "type": [
        "integer",
        "null"
      ],
      "enum": [
        1,
        null
      ],
      "description": "1 only: Morse returns one choice. Any other value is refused with 400 invalid_parameter. 1 is sent to the model only from an API key whose forward_settings is on, and any other key is refused it with 400 setting_not_forwarded."
    },
    "response_format": {
      "type": [
        "object",
        "null"
      ],
      "description": "JSON mode: {\"type\":\"json_object\"} or {\"type\":\"json_schema\",\"json_schema\":{...}}, sent to the model as given. {\"type\":\"text\"} or null counts as absent, and any other type is refused with 400 invalid_parameter. Sent only from an API key whose forward_settings is on, and any other key is refused it with 400 setting_not_forwarded. Morse sends it only to an endpoint that records that it honours the type, picking one among the model's endpoints, and refuses it with 400 unsupported_parameter when the model has none, such as a Claude, Gemini, or GPT model, or an E2EE model reached in plaintext. How closely the reply follows a schema is up to the model's host."
    },
    "provider": {
      "type": "object",
      "additionalProperties": false,
      "description": "Conditions on the model that serves the request. Morse checks them itself and never sends this object to the model's provider, except in an E2EE request body, which Morse forwards as sent. Morse chooses the provider within a privacy tier, and a reply does not name it. order, sort, preferred_min_throughput, preferred_max_latency, and require_parameters are accepted after a check of their shape and have no effect. quantizations chooses among the providers by the precision each serves. only, ignore, and enforce_distillable_text are refused with 400 provider_choice_unsupported. Any other field is refused with 400 invalid_parameter, which names the field.",
      "properties": {
        "min_privacy": {
          "type": "string",
          "enum": [
            "anon",
            "private",
            "tee",
            "e2ee"
          ],
          "description": "The lowest privacy tier the request may run at, from lowest to highest anon, private, tee, and e2ee. TEE is opt-in: without min_privacy, or with anon or private, a request on a model id runs at private or anon, at or above the floor, where the model has an endpoint there, so set tee to require attested hardware. A model whose tier, as GET /v1/models lists it, is below it is refused with 400 privacy_floor_unmet before Morse calls it or holds any credit. Any other value is refused with 400 invalid_parameter. An E2EE model meets every floor, and its encrypted body is forwarded as sent, so an E2EE request leaves min_privacy out."
        },
        "zdr": {
          "type": "boolean",
          "description": "true raises the floor to private and keeps only the endpoints that retain no data. An endpoint whose retention Morse has not confirmed, such as a tee endpoint today, is left out, so a model served only by those is refused with 400 privacy_floor_unmet. false does nothing."
        },
        "data_collection": {
          "type": "string",
          "enum": [
            "allow",
            "deny"
          ],
          "description": "deny is the same as zdr true. allow does nothing."
        },
        "allow_fallbacks": {
          "type": "boolean",
          "description": "false keeps only the endpoints at the privacy tier of the first one the request can reach, so the request is served at that tier or fails. Retries among that tier's endpoints stay. true does nothing."
        },
        "max_price": {
          "type": "object",
          "additionalProperties": false,
          "description": "The most the request may cost per million tokens, in dollars, as a number or a string holding one. Morse drops every tier whose price to you, which is list for an API key, is above a cap, and refuses with 400 max_price_unmet when none is left. image, audio, and request are refused with 400 unsupported_parameter.",
          "properties": {
            "prompt": {
              "type": [
                "number",
                "string"
              ],
              "description": "Dollars per million prompt tokens."
            },
            "completion": {
              "type": [
                "number",
                "string"
              ],
              "description": "Dollars per million completion tokens."
            }
          }
        },
        "quantizations": {
          "type": [
            "array",
            "null"
          ],
          "minItems": 1,
          "items": {
            "type": "string",
            "enum": [
              "int4",
              "int8",
              "fp4",
              "mxfp4",
              "nvfp4",
              "fp6",
              "fp8",
              "mxfp8",
              "fp16",
              "bf16",
              "fp32",
              "unknown"
            ]
          },
          "description": "The precisions a provider may serve the model at, in OpenRouter's names (https://openrouter.ai/docs/guides/routing/provider-selection, \"Quantization Levels\"). Morse keeps only the providers whose published precision the list admits, at the tiers the request already reaches, and every retry and failover stays among them. fp4 also admits mxfp4 and nvfp4, and fp8 also admits mxfp8. A provider that publishes no precision, as no host of a closed model does, is unknown, and qualifies only when the list names unknown. The filter never moves a request to another tier: when no provider qualifies, the request is refused with 400 quantization_unmet. GET /v1/models lists each tier's quantizations. An empty list, or a name not in the enum, is refused with 400 invalid_parameter, and null does nothing. An E2EE request sealed to a Phala or NEAR endpoint that names quantizations is refused with 400 quantization_unsupported before the provider's body check: a Phala body's provider must be exactly {\"aci_verified\":true,\"zdr\":true}, and a NEAR body is forwarded verbatim and may carry no provider field. A Tinfoil body is encrypted whole, so Morse cannot read the field there: it neither filters nor refuses on it, and the body reaches the Tinfoil endpoint it is sealed to as sent."
        },
        "order": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Accepted and ignored. Morse chooses the provider."
        },
        "sort": {
          "type": [
            "string",
            "object"
          ],
          "description": "Accepted and ignored. A string, or an object with by and partition."
        },
        "preferred_min_throughput": {
          "type": [
            "number",
            "object"
          ],
          "description": "Accepted and ignored."
        },
        "preferred_max_latency": {
          "type": [
            "number",
            "object"
          ],
          "description": "Accepted and ignored."
        },
        "require_parameters": {
          "type": "boolean",
          "description": "Accepted and ignored. Morse refuses or drops a field by the model's own rules and does not route around it."
        }
      }
    }
  },
  "$defs": {
    "ChatMessage": {
      "type": "object",
      "required": [
        "role"
      ],
      "description": "One message of the conversation. Morse keeps content and tool_calls on an assistant message, content and tool_call_id on a tool message, and only content on every other role. It drops name.",
      "properties": {
        "role": {
          "type": "string",
          "description": "system, developer, user, assistant, or tool."
        },
        "content": {
          "description": "Text, or an array of content parts. Media must be inline. If an image_url, video_url, audio_url, or file_url part has a URL that does not start with data:, Morse refuses the request with remote_media. A file part may carry only file_data and filename.",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ContentPart"
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "tool_calls": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "The tool calls an assistant message made, as the model returned them."
        },
        "tool_call_id": {
          "type": "string",
          "description": "On a tool message, the id of the tool call it answers."
        }
      }
    },
    "ContentPart": {
      "type": "object",
      "required": [
        "type"
      ],
      "description": "A part of a message's content. Anthropic, Gemini, and OpenAI models take text parts, and image_url parts with base64 JPEG, PNG, GIF, or WebP data URLs and detail set to auto, low, or high. Other part types reach only the models that read them.",
      "properties": {
        "type": {
          "type": "string",
          "description": "text, image_url, or another part type the model reads."
        },
        "text": {
          "type": "string"
        },
        "image_url": {
          "type": "object",
          "required": [
            "url"
          ],
          "properties": {
            "url": {
              "type": "string",
              "description": "A data: URL, such as data:image/png;base64,iVBORw0KGgo..."
            },
            "detail": {
              "type": "string",
              "enum": [
                "auto",
                "low",
                "high"
              ]
            }
          }
        }
      }
    },
    "Tool": {
      "type": "object",
      "required": [
        "type",
        "function"
      ],
      "properties": {
        "type": {
          "const": "function"
        },
        "function": {
          "type": "object",
          "required": [
            "name"
          ],
          "properties": {
            "name": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "parameters": {
              "type": "object",
              "description": "A JSON Schema object for the function's arguments."
            }
          }
        }
      }
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/trymorse-ai-chat-completion-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.