Skip to main content
Glama

Run a custom model

run_custom_model

Run a user-supplied prompt against a developer-provided OpenAI-compatible or custom REST HTTPS model endpoint. Use validate_custom_model to test URL and adapter settings before sending. Returns model-generated text, model name, optional usage, and account state. Requires active trial or Pro and transmits prompt content to the selected provider. Credentials are transient, not persisted; localhost/private networks are not supported.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoModel identifier at the custom provider, when needed.
apiKeyNoTransient authentication key sent to the chosen provider; never log or embed in prompts.
promptYesRequired nonempty prompt to send externally, maximum 30,000 characters.
systemNoOptional system instructions supported by the endpoint.
baseUrlNoRequired public HTTPS base URL for openai-compatible mode.
authModeNoCustom REST authentication mode, default bearer.bearer
endpointNoRequired public HTTPS inference URL for custom-rest mode.
maxTokensNoOptional maximum output token count, subject to model limits.
uiLanguageNoInterface language name or code, e.g. EN; independent of source and response languages.EN
adapterModeYesAdapter for the target endpoint: openai-compatible or custom-rest.
promptFieldNoCustom REST request JSON key for prompt content.prompt
systemFieldNoCustom REST request JSON key for system instructions.system
temperatureNoOptional response sampling randomness between 0 and 2.
apiKeyHeaderNoCustom REST API-key authentication header name.x-api-key
extraHeadersNoExtra HTTP headers required by the provider, if any.
inputLanguageNoLanguage name or code of input text, e.g. es; defaults to EN.EN
outputLanguageNoRequested output language name or code, e.g. fr; defaults to EN.EN
responseTextPathNoOptional JSON response field/path containing generated text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed18 schema fields changed
    • addedInput schema / properties / adapterMode / description
      Added value: +"Adapter for the target endpoint: openai-compatible or custom-rest."
    • addedInput schema / properties / apiKey / description
      Added value: +"Transient authentication key sent to the chosen provider; never log or embed in prompts."
    • addedInput schema / properties / apiKeyHeader / description
      Added value: +"Custom REST API-key authentication header name."
    • addedInput schema / properties / authMode / description
      Added value: +"Custom REST authentication mode, default bearer."
    • addedInput schema / properties / baseUrl / description
      Added value: +"Required public HTTPS base URL for openai-compatible mode."
    • addedInput schema / properties / endpoint / description
      Added value: +"Required public HTTPS inference URL for custom-rest mode."
    • addedInput schema / properties / extraHeaders / description
      Added value: +"Extra HTTP headers required by the provider, if any."
    • addedInput schema / properties / inputLanguage / description
      Added value: +"Language name or code of input text, e.g. es; defaults to EN."
    • addedInput schema / properties / maxTokens / description
      Added value: +"Optional maximum output token count, subject to model limits."
    • addedInput schema / properties / model / description
      Added value: +"Model identifier at the custom provider, when needed."
    • addedInput schema / properties / outputLanguage / description
      Added value: +"Requested output language name or code, e.g. fr; defaults to EN."
    • addedInput schema / properties / prompt / description
      Added value: +"Required nonempty prompt to send externally, maximum 30,000 characters."
    • addedInput schema / properties / promptField / description
      Added value: +"Custom REST request JSON key for prompt content."
    • addedInput schema / properties / responseTextPath / description
      Added value: +"Optional JSON response field/path containing generated text."
    • addedInput schema / properties / system / description
      Added value: +"Optional system instructions supported by the endpoint."
    • addedInput schema / properties / systemField / description
      Added value: +"Custom REST request JSON key for system instructions."
    • addedInput schema / properties / temperature / description
      Added value: +"Optional response sampling randomness between 0 and 2."
    • addedInput schema / properties / uiLanguage / description
      Added value: +"Interface language name or code, e.g. EN; independent of source and response languages."
  2. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.