NativePort · Schema

InferenceChatRequest

OpenAI Chat Completions-shaped, but deliberately narrower: only the field set every one of the four backing providers can express in common is accepted (this schema's own property list — the same set `GET /inference/v1/models` reports per model as `supported_parameters`). A field outside it is rejected with `400 unsupported_parameter` before any upstream call.

Artificial IntelligenceCollaborationPlatformPrivacyIntegrationCompany

Properties

Name Type Description
model string A canonical model id. Mandatory — there is no default and no fallback. See the [Inference API guide](/inference) for the `openai/` / `anthropic/` / `xai/` / `huggingface//[:p
messages array
max_tokens integer For a request resolving to an Anthropic model, mapped to that API's required `max_tokens` field; if neither this nor `max_completion_tokens` is set, the gateway injects Anthropic's configured default
max_completion_tokens integer
temperature number
top_p number
stop object
stream boolean Selects the `text/event-stream` response form over a single JSON object.
stream_options object
tools array
tool_choice object
parallel_tool_calls boolean
View JSON Schema on GitHub

JSON Schema

nativeport-ai-inference-chat-request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nativeport-ai/json-schema/nativeport-ai-inference-chat-request-schema.json",
  "title": "InferenceChatRequest",
  "description": "OpenAI Chat Completions-shaped, but deliberately narrower: only the field set every one of the\nfour backing providers can express in common is accepted (this schema's own property list —\nthe same set `GET /inference/v1/models` reports per model as `supported_parameters`). A field\noutside it is rejected with `400 unsupported_parameter` before any upstream call.\n",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nativeport-ai-openapi.yml#/components/schemas/InferenceChatRequest",
  "type": "object",
  "properties": {
    "model": {
      "type": "string",
      "description": "A canonical model id. Mandatory — there is no default and no fallback. See the [Inference API guide](/inference) for the `openai/<id>` / `anthropic/<id>` / `xai/<id>` / `huggingface/<owner>/<model>[:provider]` forms."
    },
    "messages": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/InferenceChatMessage"
      }
    },
    "max_tokens": {
      "type": "integer",
      "minimum": 1,
      "description": "For a request resolving to an Anthropic model, mapped to that API's required `max_tokens` field; if neither this nor `max_completion_tokens` is set, the gateway injects Anthropic's configured default rather than letting the call 400 there alone."
    },
    "max_completion_tokens": {
      "type": "integer",
      "minimum": 1
    },
    "temperature": {
      "type": "number",
      "format": "double"
    },
    "top_p": {
      "type": "number",
      "format": "double"
    },
    "stop": {
      "$ref": "#/$defs/InferenceChatRequestStop"
    },
    "stream": {
      "type": "boolean",
      "description": "Selects the `text/event-stream` response form over a single JSON object."
    },
    "stream_options": {
      "$ref": "#/$defs/InferenceChatRequestStreamOptions"
    },
    "tools": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/InferenceToolDefinition"
      }
    },
    "tool_choice": {
      "$ref": "#/$defs/InferenceToolChoice"
    },
    "parallel_tool_calls": {
      "type": "boolean"
    }
  },
  "required": [
    "model",
    "messages"
  ],
  "$defs": {
    "InferenceChatMessage": {
      "type": "object",
      "properties": {
        "role": {
          "$ref": "#/$defs/InferenceChatMessageRole"
        },
        "content": {
          "$ref": "#/$defs/InferenceChatMessageContent",
          "description": "Required for every role except `assistant` when it carries `tool_calls` instead. A plain\nstring, or an array of `text`/`image_url` parts (see `InferenceContentPart`) — image parts\nare validated the same way regardless of role, so vision-capability rejection also applies\nto a `tool` message's image content.\n"
        },
        "tool_calls": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InferenceToolCall"
          },
          "description": "Only valid on an `assistant` message."
        },
        "tool_call_id": {
          "type": "string",
          "description": "Required on a `tool` message (naming the call this message answers); invalid on any other role."
        }
      },
      "required": [
        "role"
      ],
      "title": "InferenceChatMessage"
    },
    "InferenceChatMessageContent": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "#/$defs/InferenceChatMessageContent1"
        }
      ],
      "description": "Required for every role except `assistant` when it carries `tool_calls` instead. A plain\nstring, or an array of `text`/`image_url` parts (see `InferenceContentPart`) — image parts\nare validated the same way regardless of role, so vision-capability rejection also applies\nto a `tool` message's image content.\n",
      "title": "InferenceChatMessageContent"
    },
    "InferenceChatMessageContent1": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/InferenceContentPart"
      },
      "title": "InferenceChatMessageContent1"
    },
    "InferenceChatMessageRole": {
      "type": "string",
      "enum": [
        "system",
        "user",
        "assistant",
        "tool"
      ],
      "title": "InferenceChatMessageRole"
    },
    "InferenceChatRequestStop": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "title": "InferenceChatRequestStop"
    },
    "InferenceChatRequestStreamOptions": {
      "type": "object",
      "properties": {
        "include_usage": {
          "type": "boolean",
          "description": "Emit one extra usage-only chunk (empty `choices`) immediately before `[DONE]`."
        }
      },
      "title": "InferenceChatRequestStreamOptions"
    },
    "InferenceContentPart": {
      "oneOf": [
        {
          "$ref": "#/$defs/InferenceTextContentPart"
        },
        {
          "$ref": "#/$defs/InferenceImageContentPart"
        }
      ],
      "title": "InferenceContentPart"
    },
    "InferenceImageContentPart": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "image_url"
          ]
        },
        "image_url": {
          "$ref": "#/$defs/InferenceImageContentPartImageUrl"
        }
      },
      "required": [
        "type",
        "image_url"
      ],
      "title": "InferenceImageContentPart"
    },
    "InferenceImageContentPartImageUrl": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "A `https://` URL or a `data:` URI. Only honored for a model whose\n`GET /inference/v1/models` entry reports `capabilities.vision: true` — sent to any\nother model, the whole request is rejected preflight with `400 unsupported_parameter`.\n"
        }
      },
      "required": [
        "url"
      ],
      "title": "InferenceImageContentPartImageUrl"
    },
    "InferenceTextContentPart": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "text"
          ]
        },
        "text": {
          "type": "string"
        }
      },
      "required": [
        "type",
        "text"
      ],
      "title": "InferenceTextContentPart"
    },
    "InferenceToolCall": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "function"
          ]
        },
        "function": {
          "$ref": "#/$defs/InferenceToolCallFunction"
        }
      },
      "required": [
        "id",
        "type",
        "function"
      ],
      "title": "InferenceToolCall"
    },
    "InferenceToolCallFunction": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "arguments": {
          "type": "string",
          "description": "A JSON-encoded string of the call's arguments (not a nested object)."
        }
      },
      "required": [
        "name",
        "arguments"
      ],
      "title": "InferenceToolCallFunction"
    },
    "InferenceToolChoice": {
      "oneOf": [
        {
          "$ref": "#/$defs/InferenceToolChoice0"
        },
        {
          "$ref": "#/$defs/InferenceToolChoice1"
        }
      ],
      "description": "`\"auto\"`, `\"none\"`, `\"required\"`, or an object pinning one specific function tool.",
      "title": "InferenceToolChoice"
    },
    "InferenceToolChoice0": {
      "type": "string",
      "enum": [
        "auto",
        "none",
        "required"
      ],
      "title": "InferenceToolChoice0"
    },
    "InferenceToolChoice1": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "function"
          ]
        },
        "function": {
          "$ref": "#/$defs/InferenceToolChoiceOneOf1Function"
        }
      },
      "required": [
        "type",
        "function"
      ],
      "title": "InferenceToolChoice1"
    },
    "InferenceToolChoiceOneOf1Function": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "title": "InferenceToolChoiceOneOf1Function"
    },
    "InferenceToolDefinition": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "function"
          ]
        },
        "function": {
          "$ref": "#/$defs/InferenceToolDefinitionFunction"
        }
      },
      "required": [
        "type",
        "function"
      ],
      "title": "InferenceToolDefinition"
    },
    "InferenceToolDefinitionFunction": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9_-]{1,64}$"
        },
        "description": {
          "type": "string"
        },
        "parameters": {
          "type": "object",
          "additionalProperties": {
            "description": "Any type"
          },
          "description": "A JSON Schema object describing the function's arguments. Omitted means the function takes none."
        }
      },
      "required": [
        "name"
      ],
      "title": "InferenceToolDefinitionFunction"
    }
  }
}

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/nativeport-ai-inference-chat-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.