Skip to main content
Glama

RelaySwitch

Send a chat request

chat

Sends messages to any chat model id through POST /v1/chat/completions and returns the answer, the token usage and what the request cost. system adds instructions, image_urls lets a model that sees images look at them (a file generate made works), web_search lets the model search while it answers. Billed to the key in the MCP request's Authorization header (Bearer sk-relay-live-...); without one it fails.

Input Schema

NameRequiredDescriptionDefault
modelYesA chat model id from list_models.
systemNoInstructions placed ahead of the conversation as a system message.
messagesYesThe conversation, OpenAI chat format.
image_urlsNoImage URLs attached to the last user message, for the chat models that take images (input_modalities in list_models). A file generate made works.
max_tokensNoCap on completion tokens.
web_searchNoTrue: the model may search the web while it answers (billed per search, the price in GET /v1/catalog server_tools).
temperatureNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources