Glif API
All the AI media models in one API
Compose Glif projects, generate media, manage assets, read user-owned skills, and return structured media results from a single HTTP endpoint.
OpenAPI 3.1 spec
Start here for generated clients, API explorers, and schema-aware tooling.
Endpoint
POST https://glif.app
/api/mcp
Auth
Authorization: Bearer
glif_v1_...
Accept
application/json, text/event-stream
both required
Format
JSON-RPC 2.0
over HTTP
Spec
/openapi.yml
/openapi.json
Public preview. Mint a token at /settings/api-tokens. Staff accounts may be blocked on some preview branches because they share production data.
What you can build
Use the same core platform that powers Glif chats, packaged for product integrations, automation scripts, internal tools, and agent runtimes.
Project-based media generation
Compose durable Glif projects from natural language and let Glif pick models, run tools, and return media links.
Assets and media
Upload files to use as references, and read a project's generated media and recent messages with get_project.
User-owned skills
List and load the authenticated user's personal skills without exposing global Glif skills.
Quickstart
List the available tools, then call one. Replace $GLIF_TOKEN with a token from /settings/api-tokens.
curl https://glif.app/api/mcp \
-H "Authorization: Bearer $GLIF_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"compose_project","arguments":{"prompt":"a watercolor fox in a snowy forest"}}}'Wire format
The API uses JSON-RPC 2.0 so every function can share one authenticated endpoint and one response shape. A function call is always method="tools/call" with params.name and params.arguments.
Call tools/list for the authoritative, machine-readable input/output schema of every tool. The OpenAPI spec documents the endpoint and tool set for API-catalog tooling.
Reference
- /openapi.ymlOpenAPI YAML.
- /openapi.jsonOpenAPI JSON.
- /llms.txtLLM-readable capabilities.
- JSON-RPC 2.0Wire protocol.
- /mcpMCP setup for agent clients.