Opper AI · Schema

ChatRequest

Artificial IntelligenceGatewaysEuropeanOpenAI-CompatibleGDPR

Properties

Name Type Description
cache_control object Opt in to automatic prompt caching for Anthropic-family models: {"type":"ephemeral"} (optionally "ttl":"1h"). Places one moving cache breakpoint on the largest cacheable prefix. Also settable per cont
custom_model_credentials object
max_completion_tokens integer
max_tokens integer
messages array
metadata object
model string
models array Fallback models tried in order when the model before them fails for any reason (provider error; rate limit; timeout; a member blocked by one of your rules). Same OpenRouter shape: send the primary in
output_schema object
prompt_cache_key string OpenAI cache-routing key: a stable name for the prompt prefix this request shares with others (e.g. a document id for a fan-out over one context). Forwarded to OpenAI and used to keep requests that sh
reasoning_effort string
response_format object
service_tier string Processing tier. flex: discounted and slower; when the provider has no flex capacity the call fails with 429 instead of running at the full price. priority (alias fast): faster at a premium; falls bac
stop array
stream boolean
stream_options object
temperature number
tool_choice object Any value
tools array
top_p number
View JSON Schema on GitHub

JSON Schema

opper-chat-request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/opper/main/json-schema/opper-chat-request-schema.json",
  "title": "ChatRequest",
  "x-generated": "2026-10-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/opper-openapi.json#/components/schemas/ChatRequest",
  "properties": {
    "cache_control": {
      "description": "Opt in to automatic prompt caching for Anthropic-family models: {\"type\":\"ephemeral\"} (optionally \"ttl\":\"1h\"). Places one moving cache breakpoint on the largest cacheable prefix. Also settable per content part for precise placement. Caching is off unless set; no-op on providers with automatic server-side caching (OpenAI",
      "type": "object"
    },
    "custom_model_credentials": {
      "properties": {
        "api_key": {
          "type": "string"
        },
        "base_url": {
          "type": "string"
        },
        "extra": {
          "type": "object"
        },
        "identifier": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "required": [
        "identifier",
        "api_key"
      ],
      "type": "object"
    },
    "max_completion_tokens": {
      "type": "integer"
    },
    "max_tokens": {
      "type": "integer"
    },
    "messages": {
      "items": {
        "properties": {
          "content": {
            "description": "Any value"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "tool_call_id": {
            "type": "string"
          },
          "tool_calls": {
            "items": {
              "properties": {
                "extra_content": {
                  "description": "Any value"
                },
                "function": {
                  "properties": {
                    "arguments": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "arguments"
                  ],
                  "type": "object"
                },
                "id": {
                  "type": "string"
                },
                "thought_signature": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "type",
                "function"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "role",
          "content"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "metadata": {
      "type": "object"
    },
    "model": {
      "type": "string"
    },
    "models": {
      "description": "Fallback models tried in order when the model before them fails for any reason (provider error; rate limit; timeout; a member blocked by one of your rules). Same OpenRouter shape: send the primary in model and the rest here; or omit model and the first entry is the primary. Each entry is any model string: a bare pooled name; a provider/model id; an org alias. Not allowed together with a dynamic/<name> route. At most 10 entries. Which model answered is in meta.routing.served and the X-Opper-Served-Model header; the model field still echoes what you sent.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "output_schema": {
      "type": "object"
    },
    "prompt_cache_key": {
      "description": "OpenAI cache-routing key: a stable name for the prompt prefix this request shares with others (e.g. a document id for a fan-out over one context). Forwarded to OpenAI and used to keep requests that share the key on the same cache replica at providers with per-replica prompt caches.",
      "type": "string"
    },
    "reasoning_effort": {
      "type": "string"
    },
    "response_format": {
      "type": "object"
    },
    "service_tier": {
      "description": "Processing tier. flex: discounted and slower; when the provider has no flex capacity the call fails with 429 instead of running at the full price. priority (alias fast): faster at a premium; falls back to the default tier. ultrafast: fastest; falls back to priority then default. default and auto: the provider default. A model without an endpoint for the requested tier runs at the default tier. The tier that ran is in the X-Opper-Served-Service-Tier header.",
      "type": "string"
    },
    "stop": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "stream": {
      "type": "boolean"
    },
    "stream_options": {
      "properties": {
        "include_usage": {
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "temperature": {
      "type": "number"
    },
    "tool_choice": {
      "description": "Any value"
    },
    "tools": {
      "items": {
        "properties": {
          "aspect_ratio": {
            "type": "string"
          },
          "function": {
            "properties": {
              "description": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "parameters": {
                "type": "object"
              }
            },
            "required": [
              "name"
            ],
            "type": "object"
          },
          "model": {
            "type": "string"
          },
          "quality": {
            "type": "string"
          },
          "size": {
            "type": "string"
          },
          "style": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "top_p": {
      "type": "number"
    }
  },
  "required": [
    "messages"
  ],
  "type": "object"
}

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/opper-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. See our Privacy Policy and Terms.

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