Course 2: Building with MIFY — Chapter 1
Chapter 1: API Basics and Authentication
Section titled “Chapter 1: API Basics and Authentication”Learn to interact with MIFY programmatically through the REST API.
What You’ll Learn
Section titled “What You’ll Learn”- How the MIFY API is structured
- How to authenticate with API keys
- How to create and run workflows via API
API Structure
Section titled “API Structure”MIFY exposes 790+ REST endpoints at https://your-mify-instance/api/. Key areas:
| Area | Base Path | What You Can Do |
|---|---|---|
| Graphs | /api/graphs | Create, update, delete, run workflows |
| Templates | /api/templates | Browse available templates |
| Content Gen | /api/content-gen | Generate images, text, video |
| Executions | /api/executions | View run history |
| Knowledge Bases | /api/knowledge-bases | Manage document collections |
Full interactive reference: API Explorer
Authentication
Section titled “Authentication”Create an API key in Settings → API Keys, then use it as a Bearer token:
# List your workflowscurl -H "Authorization: Bearer mify_your_api_key" \ https://your-instance/api/graphs
# Create a workflowcurl -X POST \ -H "Authorization: Bearer mify_your_api_key" \ -H "Content-Type: application/json" \ -d '{"name": "My API Workflow"}' \ https://your-instance/api/graphsYour First API Call
Section titled “Your First API Call”# 1. List templatescurl -H "Authorization: Bearer mify_xxx" \ https://your-instance/api/templates
# 2. Get a specific templatecurl -H "Authorization: Bearer mify_xxx" \ https://your-instance/api/templates/rag-qa
# 3. Create a graph from the templatecurl -X POST \ -H "Authorization: Bearer mify_xxx" \ -H "Content-Type: application/json" \ -d '{"name": "My RAG Pipeline", "templateId": "rag-qa"}' \ https://your-instance/api/graphsExercise
Section titled “Exercise”- Create an API key in Settings → API Keys
- Use
curlor Postman to list your graphs - Create a new graph via API
- View it in the Canvas UI to confirm it was created