# AI Image & Video Generation — MCP Server > AI image and video generation for AI agents via MCP (Model Context Protocol) and REST API. > Full API reference: https://genframe.ru/llms-full.txt ## Connect MCP Server To connect, add this to `.mcp.json` in the project root (replace YOUR_API_KEY with the actual key): ```json { "mcpServers": { "genframe": { "type": "streamable-http", "url": "https://genframe.ru/mcp/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } } } ``` IMPORTANT: - The exact MCP endpoint URL is: https://genframe.ru/mcp/mcp - Do NOT change this URL. Do NOT use subdomains like mcp.genframe.ru — they do not exist. - The API key format is: aimcp_... (starts with "aimcp_") - Auth goes in the "headers" field as "Bearer {key}", NOT in env vars or URL params. - After writing .mcp.json, restart the Claude Code session for the MCP server to connect. ## Available MCP Tools After connecting, these tools become available: - `generate_image` — generate an image from a text prompt (params: prompt, model, aspect_ratio, resolution, output_format, image_urls) - `generate_video` — generate a video from a text prompt (params: prompt, model, duration_seconds, aspect_ratio, image_url) - `check_status` — poll job status by job_id, returns result_url when completed - `list_models` — list available AI models with pricing in credits ## Quick Start 1. Register at https://genframe.ru/register (30 free credits included) 2. Create an API key in the dashboard at https://genframe.ru/dashboard/keys 3. Add the MCP config above with your key 4. Restart session, then call `list_models` to verify connection ## Pricing (credits) Image: 8-32 credits per generation depending on model Video: 18-97 credits per generation depending on model Credit packs: 100 cr / 100 RUB, 500 cr / 400 RUB, 2000 cr / 1400 RUB ## REST API (alternative to MCP) Base URL: `https://genframe.ru/api` Auth: `Authorization: Bearer ` Key endpoints: - `POST /api/generate/image` — generate image - `POST /api/generate/video` — generate video - `GET /api/jobs/{job_id}` — check job status - `GET /api/models` — list models and pricing - `GET /api/billing/balance` — check credit balance ## Links - Full API reference: https://genframe.ru/llms-full.txt - MCP discovery: https://genframe.ru/.well-known/mcp.json - Website: https://genframe.ru - Contact: support@genframe.ai