🥞
Glif Docs/Guide
  • Getting Started
    • 👋What is Glif?
    • 💡What can I do with a glif?
      • 🏃Run a glif
      • 🔌Build a glif
      • 🔀Remix a glif
      • 🗣️Comment on a glif
      • 🔳Embed a glif
    • ⚒️How do I build a glif?
      • 📽️Video tutorial: Building a simple image generator
      • 🟰Using variables
    • ⚙️Profile Settings
    • 🪙Credits and Payments
    • ❓FAQs
  • Blocks
    • 🙋Inputs
      • ✍️Text Input Block
      • 🖼️Image Input Block
      • 📋Multipick Block
    • 🪄Generators
      • 📃Text Block
      • 🖼️Image Block
      • ➡️Image to Text Block
        • Florence2Sam2Segmenter
    • 🧰Tools
      • 🔀Text Combiner Block
      • 🔬JSON Extractor Block
      • 🎬Videokit Tools
    • 💅Styling
      • 🎨HTML Block
      • 🖼️Canvas Block
    • 🧑‍🔬Advanced/Experimental
      • 🎙️Audio Input Block
      • ↔️Glif Block
      • 🌐Web Fetcher Block
      • 🔊Audio Spell
      • 🧱ComfyUI Block
      • 📡Audio to Text Block
      • 🎥Video Input Block
      • 🔧JSON Repair Block
  • Apps
    • 🎨Glif It! Browser Extension
  • Glif University
    • 🎥Video Tutorials
      • 🐲How To: D&D Character Sheet Generator
      • 🧠How To: Expanding Brain Meme Generator
      • 🦑How To: Occult Memelord Generator
      • 🥸How To: InstantID Portrait Restyle Glif
      • 🕺How To: Style and Pose a Character with InstantID + Controlnet
      • 😱How To: Create a Simple Cartoon Portrait Animation Glif (LivePortrait + Custom Blocks)
      • 👗How to Create a Clothing Restyler App (IP Adapter, ControlNet + GPT Vision)
      • 🤡How to Create a 4+ Panel Storyboard/Comic (Flux Schnell)
      • 🎂How to Create a Recipe Generator with Accompanying Pictures
      • How to Use JasperAI Depth Controlnet on Flux Dev
      • 🦸‍♂️How to Make a Consistent Comic Panel Generator
    • 🧑‍🏫Prompt Engineering 101
    • 🖼️ControlNet
    • 📚AI Glossary
  • API - for Developers
    • ⚡Running glifs via the API
    • 🤖Using AI Assistants to build with the Glif API
    • 📙Reading & writing data via the API
    • 🗾Glif Graph JSON Schema
    • 📫Embed player & custom webpages
    • 📫Sample code
    • ❓What can I make with the Glif API?
      • Browser Extensions
      • Discord Bots
      • Games
      • Social Media Bots
      • Experimental Projects
  • Policies
    • 👨‍👩‍👧‍👦Community Guidelines
  • Programs
    • 🖼️Loradex Trainer Program
  • Community Resources
    • 🧑‍🤝‍🧑Resources Created by Glif Community Members
  • Contact Us
    • 📣Send us your feedback
    • 🚔Information for law enforcement
Powered by GitBook
On this page
  1. API - for Developers

Using AI Assistants to build with the Glif API

how to vibecode effectively using the Glif API

Protips for vibecoders

For your convenience, we've created a .txt file of this API documentation that works well with AI assistants like Claude, ChatGPT, Cursor, Windsurf, Cline, Lovable, Bolt, etc.

Here's how to use it effectively:

  1. Download the API documentation text file

  2. Share it with your preferred AI assistant

  3. Describe what you want to build

We also have a new graph JSON schema which can help your LLM better understand the internals of glifs, and useful if you're trying to create or edit glifs directly.

Example System Prompt

Here's what the AI assistants will understand about our API:

You are assisting developers with the Glif API, a flexible API for building complex workflows with AI models on various types of inputs. Core details:

Endpoint & Auth:
- URL: https://simple-api.glif.app
- Bearer token required in headers
- Always returns 200 OK (check error field in response)

Request:
{
    "id": "<glif_id>",
    "inputs": ["value1", "value2"] // Positional inputs
    "visibility": "PUBLIC" // Optional, default is "PRIVATE"
    // OR
    "inputs": {
        "inputName1": "value1",
        "inputName2": "value2"
    }
}

Response:
{
    "id": "<glif_id>",
    "output": "<result_url>",
    "error": "error message if any"
}

Key Features:
- Supports multiple input types (text, images, audio, etc.)
- Input types depend on the specific glif being used
- Default values used if inputs missing (use ?strict=1 to disable)
- Rate limits and timeouts should be handled
- CORS enabled for browser requests

Help users by:
- Understanding their specific glif's input requirements
- Providing appropriate code examples and error handling
- Suggesting testing strategies for their use case

Asking for Help

When working with the AI assistant, be specific about:

  • What you want to build

  • Your preferred programming language

  • Any specific requirements

  • Error handling needs

That's it! The AI assistant will help you implement your ideas using our API.

PreviousRunning glifs via the APINextReading & writing data via the API

Last updated 2 days ago

🤖