UI Inspect
API Reference

API Overview

Complete reference for the UI Inspect tRPC API with all available endpoints.

UI Inspect uses tRPC for its API layer, providing type-safe communication between all components. The API is available at http://localhost:3000/api/trpc.

Base URL

http://localhost:3000/api/trpc

For self-hosted instances, replace with your server URL.

Authentication

All protected endpoints require either:

  • Session auth — Cookie-based sessions from the web app
  • API key auth — Bearer token in the Authorization header
# API key authentication
curl -H "Authorization: Bearer uii_your-api-key" \
  "http://localhost:3000/api/trpc/project.list"

See Authentication for details.

Calling tRPC endpoints

From the CLI / Node.js

import type { AppRouter } from "@ui-inspect/api";
import { createTRPCClient, httpBatchLink } from "@trpc/client";

const client = createTRPCClient<AppRouter>({
  links: [
    httpBatchLink({
      url: "http://localhost:3000/api/trpc",
      headers: {
        Authorization: `Bearer ${process.env.UI_INSPECT_TOKEN}`,
      },
    }),
  ],
});

// Query
const projects = await client.project.list.query();

// Mutation
const build = await client.build.create.mutate({
  projectId: "uuid",
  branch: "main",
});

Via HTTP

tRPC endpoints are accessible as HTTP endpoints:

# Queries use GET
GET /api/trpc/project.list

# Mutations use POST
POST /api/trpc/build.create
Content-Type: application/json
{"projectId": "uuid", "branch": "main"}

tRPC uses batch requests by default. The HTTP transport URL format is /api/trpc/<procedure-name>.

API routers

Rate limits

Self-hosted instances have no rate limits by default. The hosted version applies:

TierRequests/minute
Free60
Pro600
EnterpriseUnlimited

On this page