Skip to main content
Glama

generate_text

Generate AI text responses using language models, analyze images with vision capabilities, and process file content for contextual understanding.

Instructions

Generate text using AI language models. Supports file attachments (fileContext for extracted text) and image analysis (imageBase64 for vision, Best/K2.5 model only). Requires a valid paid payment ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paymentIdYesValid payment ID (must be paid)
promptYesThe text prompt or question
modelIdYesThe AI model database ID
systemPromptNoOptional system prompt
maxTokensNoMaximum tokens in response
fileContextNoExtracted text from a file (PDF, DOCX, code, etc.) to include as context
fileNameNoName of the attached file
imageBase64NoBase64 data URI of an image for vision analysis (Best/K2.5 model only)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cnghockey/sats4ai'

If you have feedback or need assistance with the MCP directory API, please join our Discord server