Monid API

The Monid HTTP API lets developers and AI agents discover data endpoints with natural language, inspect their details, run them, and manage runs, wallet balance, spend controls (budgets and run-caps), resources, and API keys — plus a public registry of providers and endpoints. Bearer authentication with a Monid API key (monid_live_...) or an OAuth/JWT access token.

OpenAPI Specification

monid-openapi.json Raw ↑
{
  "openapi": "3.1.0",
  "info": {
    "title": "Monid API",
    "version": "0.1.0",
    "description": "Agentic payment platform for data — agents discover and buy data on demand. Authenticated `/v1/*` routes accept a Monid API key or Clerk JWT as a Bearer token. All errors return `{ code, message }`. List endpoints use cursor pagination; consult each operation schema for its last-page cursor encoding."
  },
  "servers": [
    {
      "url": "https://api.monid.ai",
      "description": "Production"
    },
    {
      "url": "https://monid.ai",
      "description": "Public registry alias (public/v1 only)"
    }
  ],
  "components": {
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Monid API key (`Authorization: Bearer mk_...`) or Clerk-issued JWT."
      }
    },
    "schemas": {
      "WhoamiResponse": {
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/AuthUser"
          },
          "workspace": {
            "$ref": "#/components/schemas/AuthWorkspace"
          }
        },
        "required": [
          "user"
        ]
      },
      "AuthUser": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "minLength": 1,
            "description": "Clerk user id.",
            "example": "user_2abcDEFghiJKLmnop"
          },
          "username": {
            "type": "string",
            "description": "Username from Clerk (may be empty)."
          },
          "email": {
            "type": "string",
            "description": "Primary email, when known.",
            "example": "dev@example.com"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "description": "Free-form user metadata record."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation time (ISO-8601)."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Record last-update time (ISO-8601)."
          }
        },
        "required": [
          "userId",
          "username",
          "metadata",
          "createdAt",
          "updatedAt"
        ]
      },
      "AuthWorkspace": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "minLength": 1,
            "description": "Workspace (Clerk organization) id.",
            "example": "org_2abcDEFghiJKLmnop"
          },
          "name": {
            "type": "string",
            "description": "Organization display name (may be empty)."
          },
          "slug": {
            "type": "string",
            "description": "Organization slug (may be empty).",
            "example": "acme-inc"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "description": "Free-form workspace metadata record."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation time (ISO-8601)."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Record last-update time (ISO-8601)."
          }
        },
        "required": [
          "workspaceId",
          "name",
          "slug",
          "metadata",
          "createdAt",
          "updatedAt"
        ],
        "description": "Absent when the caller is not part of a workspace."
      },
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "HTTP status code, duplicated in the body.",
            "example": 400
          },
          "message": {
            "type": "string",
            "description": "Human-readable error description.",
            "example": "Bad Request"
          }
        },
        "required": [
          "code",
          "message"
        ]
      },
      "WorkspaceListResponse": {
        "type": "object",
        "properties": {
          "workspaces": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceListItem"
            }
          }
        },
        "required": [
          "workspaces"
        ]
      },
      "WorkspaceListItem": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "minLength": 1,
            "description": "Workspace (Clerk organization) id.",
            "example": "org_2abcDEFghiJKLmnop"
          },
          "slug": {
            "type": [
              "string",
              "null"
            ],
            "description": "Organization slug from Clerk. `null` when the organization has no slug.",
            "example": "acme-inc"
          }
        },
        "required": [
          "workspaceId",
          "slug"
        ]
      },
      "DiscoverResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscoverResult"
            }
          },
          "query": {
            "type": "string"
          },
          "count": {
            "type": "number"
          }
        },
        "required": [
          "results",
          "query",
          "count"
        ]
      },
      "DiscoverResult": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "description": "Provider slug.",
            "example": "exa"
          },
          "providerName": {
            "type": "string",
            "description": "Human-readable provider name."
          },
          "endpoint": {
            "type": "string",
            "description": "Endpoint path.",
            "example": "/search"
          },
          "description": {
            "type": "string"
          },
          "price": {
            "$ref": "#/components/schemas/DiscoverPrice"
          },
          "score": {
            "type": "number",
            "description": "Final composed reranker score. Opaque sort context — not a fixed-range relevance probability."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "User-facing tags (e.g. `[\"verified\"]`)."
          },
          "scoreBreakdown": {
            "type": "object",
            "properties": {
              "querierScore": {
                "type": "number"
              }
            },
            "required": [
              "querierScore"
            ],
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Per-signal breakdown of the reranker's final score (`querierScore` plus one raw log-odds shift per signal)."
          },
          "hints": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "command",
                        "discover",
                        "inspect",
                        "run",
                        "getRun",
                        "stop",
                        "releaseResource"
                      ]
                    },
                    "command": {
                      "type": "string"
                    },
                    "query": {
                      "type": "string"
                    },
                    "provider": {
                      "type": "string"
                    },
                    "endpoint": {
                      "type": "string"
                    },
                    "runId": {
                      "type": "string"
                    },
                    "resourceId": {
                      "type": "string"
                    },
                    "comment": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind"
                  ]
                }
              ]
            },
            "description": "Endpoint-authored workflow hints, polymorphic by client (rendered command string for cli/api/mcp; structured target for web). Omitted for unknown clients and endpoints without authored hints."
          }
        },
        "required": [
          "provider",
          "endpoint",
          "description",
          "price",
          "score",
          "tags",
          "scoreBreakdown"
        ]
      },
      "DiscoverPrice": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "amount": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "number"
                  },
                  "currency": {
                    "type": "string",
                    "enum": [
                      "USD"
                    ]
                  }
                },
                "required": [
                  "value",
                  "currency"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "PER_TOKEN"
                    ]
                  },
                  "amount": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "number"
                      },
                      "currency": {
                        "type": "string",
                        "enum": [
                          "USD"
                        ]
                      }
                    },
                    "required": [
                      "value",
                      "currency"
                    ]
                  },
                  "per": {
                    "type": "number"
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "token",
                      "character"
                    ]
                  }
                },
                "required": [
                  "type",
                  "amount",
                  "per",
                  "unit"
                ]
              }
            ]
          },
          "flatFee": {
            "type": "object",
            "properties": {
              "value": {
                "type": "number"
              },
              "currency": {
                "type": "string",
                "enum": [
                  "USD"
                ]
              }
            },
            "required": [
              "value",
              "currency"
            ]
          },
          "period": {
            "type": "object",
            "properties": {
              "unit": {
                "type": "string",
                "enum": [
                  "MINUTE",
                  "DAY",
                  "MONTH"
                ]
              },
              "count": {
                "type": "integer",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "unit",
              "count"
            ]
          },
          "per": {
            "type": "object",
            "properties": {
              "unit": {
                "type": "string",
                "enum": [
                  "MINUTE",
                  "DAY",
                  "MONTH"
                ]
              },
              "count": {
                "type": "integer",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "unit",
              "count"
            ]
          },
          "selectors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "key": {
                  "type": "string"
                },
                "in": {
                  "type": "string",
                  "enum": [
                    "body",
                    "queryParam",
                    "pathParam"
                  ]
                }
              },
              "required": [
                "label",
                "key",
                "in"
              ]
            }
          },
          "variants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "when": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      }
                    ]
                  }
                },
                "amount": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number"
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "USD"
                          ]
                        }
                      },
                      "required": [
                        "value",
                        "currency"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "PER_TOKEN"
                          ]
                        },
                        "amount": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "number"
                            },
                            "currency": {
                              "type": "string",
                              "enum": [
                                "USD"
                              ]
                            }
                          },
                          "required": [
                            "value",
                            "currency"
                          ]
                        },
                        "per": {
                          "type": "number"
                        },
                        "unit": {
                          "type": "string",
                          "enum": [
                            "token",
                            "character"
                          ]
                        }
                      },
                      "required": [
                        "type",
                        "amount",
                        "per",
                        "unit"
                      ]
                    }
                  ]
                },
                "label": {
                  "type": "string"
                }
              },
              "required": [
                "when",
                "amount"
              ]
            }
          }
        },
        "required": [
          "type",
          "amount"
        ],
        "description": "User-facing price (markup applied, no notes)."
      },
      "DiscoverRequest": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000,
            "description": "Natural-language search query for data endpoints.",
            "example": "twitter posts"
          },
          "limit": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "default": 5,
            "description": "Requested result count. A config-driven server-side cap (`service.discover.max_results`) applies.",
            "example": 5
          },
          "minScore": {
            "type": "number",
            "minimum": 0,
            "maximum": 2,
            "description": "Per-call override for the post-rerank score floor. Results scoring below this are filtered out before truncation to `limit`. Falls back to the configured default when omitted.",
            "example": 0.2
          }
        },
        "required": [
          "query"
        ]
      },
      "PublicEndpointInfo": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "description": "Provider slug.",
            "example": "exa"
          },
          "providerDisplayName": {
            "type": "string",
            "description": "Resolved provider display name (curation > slug)."
          },
          "providerDisplayDescription": {
            "type": "string",
            "description": "Resolved provider display blurb."
          },
          "endpoint": {
            "type": "string",
            "description": "Endpoint path.",
            "example": "/search"
          },
          "displayName": {
            "type": "string",
            "description": "Resolved endpoint display label. Always populated."
          },
          "displayDescription": {
            "type": "string",
            "description": "Resolved endpoint display blurb. May be empty."
          },
          "price": {
            "$ref": "#/components/schemas/PublicPrice"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "User-facing tags (e.g. `[\"verified\"]`). Always an array; empty when no tags are set on the indexed wrapper."
          }
        },
        "required": [
          "provider",
          "providerDisplayName",
          "endpoint",
          "displayName",
          "displayDescription",
          "price",
          "tags"
        ]
      },
      "PublicPrice": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "amount": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "number"
                  },
                  "currency": {
                    "type": "string",
                    "enum": [
                      "USD"
                    ]
                  }
                },
                "required": [
                  "value",
                  "currency"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "PER_TOKEN"
                    ]
                  },
                  "amount": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "number"
                      },
                      "currency": {
                        "type": "string",
                        "enum": [
                          "USD"
                        ]
                      }
                    },
                    "required": [
                      "value",
                      "currency"
                    ]
                  },
                  "per": {
                    "type": "number"
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "token",
                      "character"
                    ]
                  }
                },
                "required": [
                  "type",
                  "amount",
                  "per",
                  "unit"
                ]
              }
            ]
          },
          "flatFee": {
            "type": "object",
            "properties": {
              "value": {
                "type": "number"
              },
              "currency": {
                "type": "string",
                "enum": [
                  "USD"
                ]
              }
            },
            "required": [
              "value",
              "currency"
            ]
          },
          "period": {
            "type": "object",
            "properties": {
              "unit": {
                "type": "string",
                "enum": [
                  "MINUTE",
                  "DAY",
                  "MONTH"
                ]
              },
              "count": {
                "type": "integer",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "unit",
              "count"
            ]
          },
          "per": {
            "type": "object",
            "properties": {
              "unit": {
                "type": "string",
                "enum": [
                  "MINUTE",
                  "DAY",
                  "MONTH"
                ]
              },
              "count": {
                "type": "integer",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "unit",
              "count"
            ]
          },
          "selectors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "key": {
                  "type": "string"
                },
                "in": {
                  "type": "string",
                  "enum": [
                    "body",
                    "queryParam",
                    "pathParam"
                  ]
                }
              },
              "required": [
                "label",
                "key",
                "in"
              ]
            }
          },
          "variants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "when": {
                  "type": "object",
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      }
                    ]
                  }
                },
                "amount": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number"
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "USD"
                          ]
                        }
                      },
                      "required": [
                        "value",
                        "currency"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "PER_TOKEN"
                          ]
                        },
                        "amount": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "number"
                            },
                            "currency": {
                              "type": "string",
                              "enum": [
                                "USD"
                              ]
                            }
                          },
                          "required": [
                            "value",
                            "currency"
                          ]
                        },
                        "per": {
                          "type": "number"
                        },
                        "unit": {
                          "type": "string",
                          "enum": [
                            "token",
                            "character"
                          ]
                        }
                      },
                      "required": [
                        "type",
                        "amount",
                        "per",
                        "unit"
                      ]
                    }
                  ]
                },
                "label": {
                  "type": "string"
                }
              },
              "required": [
                "when",
                "amount"
              ]
            }
          }
        },
        "required": [
          "type",
          "amount"
        ],
        "description": "User-facing price (markup applied)."
      },
      "InspectResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Opaque inspection id (ULID)."
          },
          "provider": {
            "type": "string",
            "description": "Provider slug (e.g., \"apify\")."
          },
          "providerName": {
            "type": "string",
            "description": "Human-readable provider name (e.g., \"Apify\")."
          },
          "endpoint": {
            "type": "string",
            "description": "Endpoint path."
          },
          "description": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "DELETE",
              "PATCH"
            ],
            "description": "HTTP method for this endpoint."
          },
          "price": {
            "$ref": "#/components/schemas/Price"
          },
          "docUrl": {
            "type": "string",
            "description": "Provider documentation URL."
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Operator-curated notes for agents — quirks, pitfalls, best practices."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags for scoring and filtering (e.g., [\"verified\"])."
          },
          "hints": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "command",
                        "discover",
                        "inspect",
                        "run",
                        "getRun",
                        "stop",
                        "releaseResource"
                      ]
                    },
                    "command": {
                      "type": "string"
                    },
                    "query": {
                      "type": "string"
                    },
                    "provider": {
                      "type": "string"
                    },
                    "endpoint": {
                      "type": "string"
                    },
                    "runId": {
                      "type": "string"
                    },
                    "resourceId": {
                      "type": "string"
                    },
                    "comment": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind"
                  ]
                }
              ]
            },
            "description": "Agent guidance map (phrase → hint), polymorphic by client: rendered command string for cli/api/mcp, structured target for web. Omitted for unknown clients."
          },
          "input": {
            "$ref": "#/components/schemas/EndpointInput"
          }
        },
        "required": [
          "id",
          "provider",
          "endpoint",
          "description",
          "tags"
        ]
      },
      "Price": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "amount": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "number"
                  },
                  "currency": {
                    "type": "string",
                    "enum": [
                      "USD"
                    ]
                  }
                },
                "required": [
                  "value",
                  "currency"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "PER_TOKEN"
                    ]
                  },
                  "amount": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "number"
                      },
                      "currency": {
                        "type": "string",
                        "enum": [
                          "USD"
                        ]
                      }
                    },
                    "required": [
                      "value",
                      "currency"
                    ]
                  },
                  "per": {
                    "type": "number"
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "token",
                      "character"
                    ]
                  }
                },
                "required": [
                  "type",
                  "amount",
                  "per",
                  "unit"
                ]
              }
            ]
          },
          "flatFee": {
            "type": "object",
            "properties": {
              "value": {
                "type": "number"
              },
              "currency": {
                "type": "string",
                "enum": [
                  "USD"
                ]
              }
            },
            "required": [
              "value",
              "currency"
            ]
          },
          "period": {
            "type": "object",
            "properties": {
              "unit": {
                "type": "string",
                "enum": [
                  "MINUTE",
                  "DAY",
                  "MONTH"
                ]
              },
              "count": {
                "type": "integer",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "unit",
              "count"
            ]
          },
          "per": {
            "type": "object",
       

# --- truncated at 32 KB (175 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/monid/refs/heads/main/openapi/monid-openapi.json