{
  "openapi": "3.1.0",
  "info": {
    "title": "Invokeable API",
    "version": "1.0.0",
    "description": "The open index of everything you can invoke — models and agents with per-provider availability, pricing and invocation code. On-demand lookups only; every model carries >=3 source references in `sources`."
  },
  "servers": [
    {
      "url": "https://invokeable.ai"
    }
  ],
  "paths": {
    "/api/v1/models": {
      "get": {
        "summary": "Thin list of all models",
        "parameters": [],
        "responses": {
          "200": {
            "description": "ids, names, creators",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/models/{id}": {
      "get": {
        "summary": "Full model entry",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "attributes, offerings with provider-specific IDs and prices, benchmarks with per-row sources, sources[] (>=3)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agents": {
      "get": {
        "summary": "Thin list of all agents",
        "parameters": [],
        "responses": {
          "200": {
            "description": "ids, names, creators",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agents/{id}": {
      "get": {
        "summary": "Full agent entry",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "interfaces, install commands, invoke methods",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/providers": {
      "get": {
        "summary": "All providers",
        "parameters": [],
        "responses": {
          "200": {
            "description": "id, name, kind",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/providers/{id}": {
      "get": {
        "summary": "Provider detail",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "auth model, base URL, docs link",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/search": {
      "get": {
        "summary": "Token search",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "search terms (AND across tokens)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "filter: model | agent | provider",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "matching entries with type + id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/snippet": {
      "get": {
        "summary": "Invocation code",
        "parameters": [
          {
            "name": "model",
            "in": "query",
            "description": "canonical model id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "description": "provider id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "description": "shell | python | typescript",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "paste-ready code with the provider's model ID substituted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/resolve": {
      "get": {
        "summary": "Constraints to ranked targets",
        "parameters": [
          {
            "name": "min_ctx",
            "in": "query",
            "description": "minimum context window",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "capability",
            "in": "query",
            "description": "comma list, e.g. tool-use",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modality",
            "in": "query",
            "description": "comma list of input modalities, e.g. image",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "max_in",
            "in": "query",
            "description": "max input $/Mtok",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "max_out",
            "in": "query",
            "description": "max output $/Mtok",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "description": "pin a provider id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "creator",
            "in": "query",
            "description": "pin a creator",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "released | ctx | price_in",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ranked models with provider + provider_model_id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/changes": {
      "get": {
        "summary": "Releases feed",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "description": "YYYY-MM-DD",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "max entries (<=100)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "models released since the date, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/graph": {
      "get": {
        "summary": "Full typed relationship graph",
        "parameters": [],
        "responses": {
          "200": {
            "description": "nodes (model|agent|provider|creator|family|capability) + edges (serves|created-by|in-family|supports|runs-models)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/graph/{id}": {
      "get": {
        "summary": "One entity's neighborhood",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "center node + its edges",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  }
}