> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flintai.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Flint AI Platform API

> Query your AI inventory, findings, and rules over HTTP, and traverse the relationships between them.

The Flint AI Platform API gives you programmatic access to everything the Platform discovers: the agents in your code, the models, tools, and MCP servers they use, the assets and locations behind them, and the issues and rules that apply. Use it to build your own dashboards, feed inventory into other systems, or automate checks in your pipeline.

The reference pages in this section are generated directly from the Platform's OpenAPI specification, so they always match the live API.

<Tip>
  **Building an integration?** Point your AI coding tool or agent at these docs so it can help you call the API, with endpoints, parameters, and response schemas in context. See [Use these docs](/flintai/cli/resources/use-these-docs) to connect Claude Code, Cursor, VS Code, or Windsurf.
</Tip>

## Base URL and authentication

Every request is authenticated with a bearer token. Create a token in **Settings**, then **API Keys**, and send it in the `Authorization` header:

```bash theme={null}
curl -H "Authorization: Bearer $FLINTAI_TOKEN" \
  https://your-instance.flintai.dev/api/v1/aispm-agents/tenants/{tenant_id}/workspaces/{workspace_id}
```

The interactive **Try it** panel on each endpoint uses this same base URL — set the `instance` variable to your subdomain to send live requests.

<Note>
  Copy your token immediately when created — it's only shown once.
</Note>

## Tenant and workspace scope

Most endpoints are scoped to a tenant and a workspace, so their paths include both identifiers:

```
/aispm-agents/tenants/{tenant_id}/workspaces/{workspace_id}
```

* **`tenant_id`** — your organization.
* **`workspace_id`** — a workspace within that organization.

Requests only return resources inside the tenant and workspace you name, and your token must have access to them.

## The inventory graph

The Platform models your AI estate as a graph. Each entity is a node, and the API exposes the edges between them so you can walk from one to the next — for example, from an agent to the models it calls, or from a model to the MCP servers it reaches.

These entity types participate in the graph:

| Entity                                | What it represents                           |
| ------------------------------------- | -------------------------------------------- |
| **Agents** (`aispm-agents`)           | AI agents discovered in your code            |
| **Models** (`aispm-models`)           | Models an agent calls                        |
| **Tools** (`aispm-tools`)             | Tools an agent can invoke                    |
| **MCP servers** (`aispm-mcp-servers`) | MCP servers an agent connects to             |
| **Assets** (`assets`)                 | Code assets that back these components       |
| **Locations** (`locations`)           | Where an asset lives (repository, file path) |

## Traverse relationships with edges

Each graph entity exposes an edge endpoint that returns its related entities:

```
GET /aispm-agents/tenants/{tenant_id}/workspaces/{workspace_id}/{id}/{edge}
```

* **`{id}`** — the entity you're starting from.
* **`{edge}`** — the relationship to follow.

For example, starting from an agent you can follow its edge to the models it uses; starting from a model you can follow its edge back to the agents that call it. The same `{id}/{edge}` pattern is available on agents, models, tools, MCP servers, assets, and locations, so you can traverse the full graph one hop at a time.

## What you can query

The endpoints are grouped by resource in the sidebar. The main areas are:

* **Inventory** — agents, models, tools, MCP servers, assets, and locations, plus their edges.
* **Findings** — issues, fine-grained issues, and issue histograms.
* **Rules** — the rules that produce findings, including static and external rules.
* **Runtime** — LLM interactions captured at runtime and their dashboards.
* **Scans** — scan runs and their results.

Browse the sidebar for the full, always-current list of endpoints, parameters, and response schemas.
