Note: The API is currently in beta public preview and may change as we continue to improve it.
OpenAPI Specification
The Glif API provides an OpenAPI 3.1 specification for generated clients, API explorers, and schema-aware tooling.- OpenAPI YAML — Canonical OpenAPI 3.1 specification
- OpenAPI JSON — Use with Postman, Insomnia, and other API tools
- Swagger Editor — Browse the API specification interactively
What You Can Build
Project-Based Media Generation
Compose durable Glif projects from natural-language prompts. Glif can choose the appropriate models, run the necessary tools, and return links to the generated media.Assets and Media
Upload files to use as references, and retrieve a project’s generated media and recent messages withget_project.
One Endpoint, Agent-Ready
The Glif API uses the same underlying interface as the Glif MCP server. You can connect an AI agent through MCP or call the API directly over HTTP.Quickstart
The API uses the MCP endpoint and JSON-RPC 2.0. First, create an API token and replace$GLIF_TOKEN in the example below with your token.
intelligence parameter determines which Glif agent runs your project:
litesmart— the defaultgenius
API Overview
Both accepted content types should be included in the
Accept header.
Wire Format
The API uses JSON-RPC 2.0, allowing all functions to share a single authenticated endpoint and response format. A function call uses:method: "tools/call"params.name— the name of the tool to callparams.arguments— the tool’s input arguments
tools/list.
The OpenAPI specification also documents the endpoint and available tool set for API-catalog and developer tooling.
Reference
The following resources provide additional information about the API:- OpenAPI YAML — Canonical OpenAPI 3.1 specification
- OpenAPI JSON — API schema for Postman, Insomnia, and code generators
- LLM-readable capabilities — Machine-readable information about the API
- JSON-RPC 2.0 — Wire protocol specification
- MCP server — Setup instructions for connecting Glif to AI agent clients
API Status
The Glif API is currently in beta public preview. API behavior, tools, and schemas may change while we continue to improve the platform.Questions and Feedback
For questions or feedback about the API and MCP, join the Glif Discord and post in#api-mcp.