Glif APIBeta public preview

All the AI media models in one API

Compose Glif projects, generate images, video, and audio, manage assets, and get structured media results from a single HTTP endpoint.

OpenAPI 3.1 spec

Start here for generated clients, API explorers, and schema-aware tooling.

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.

One endpoint, agent-ready

The same surface powers the Glif MCP server — connect an agent client via /mcp, or call it as plain HTTP from anywhere.

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"}}}'

At a glance

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

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

The API is in beta public preview — things may change while we polish.

Questions or feedback? Ping #api-mcp on Discord.