Skip to content

API overview

Send requests to https://api.trilocore.ai. Authenticated operations use Authorization: Bearer; public verification and specification endpoints need no credential. Most operations use JSON; each endpoint documents its accepted content types. No SDK is required.

curl https://api.trilocore.ai/api/v1/workspaces \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"
import os
import httpx

r = httpx.get(
    "https://api.trilocore.ai/api/v1/workspaces",
    headers={"Authorization": f"Bearer {os.environ['TRILOCORE_API_KEY']}"},
)
r.raise_for_status()
print(r.json())
const r = await fetch("https://api.trilocore.ai/api/v1/workspaces", {
  headers: { Authorization: `Bearer ${process.env.TRILOCORE_API_KEY}` },
});
if (!r.ok) throw new Error(`${r.status} ${await r.text()}`);
console.log(await r.json());

See Authentication for how to obtain a token.

Base URL and versioning

Base URL https://api.trilocore.ai
Product surface /api/v1/<product>/… — see Product namespaces
Transport HTTPS only, HTTP/1.1 and HTTP/2
Request and response bodies Usually application/json; check the endpoint for other content types. Errors use application/problem+json.

The version lives in the path, not in a header. v1 is the only version currently served, and it is additive: new endpoints, new optional request fields and new response fields may appear at any time. Treat unknown response fields as forgiving — do not fail a parse on a field you have not seen before.

One host serves the whole product. Authentication, rate limits, quota and idempotency work the same way for every endpoint, whichever product namespace it belongs to.

Product namespaces

The generated reference currently covers these product namespaces:

Namespace Product Reference
/api/v1/bevm/ EVM auditing tools: sessions and forks, targets, scans, Composer, the contract sandbox, EVM analyses Sessions and forks and the other EVM pages
/api/v1/bsvm/ the same auditing tools for Solana (SVM) programs Solana sessions and programs
/api/v1/workbench/ what both auditing workbenches share: audit evidence, long-running operations, artifacts, your Auditing IDE view Workbench
/api/v1/radar/ chain intelligence: contract code search Radar
/api/v1/workspaces/ workspaces, projects, activity, the contract and audit indexes, invitations, notes, Audit Passport attestations Workspaces and the pages after it
/api/v1/ide/ the Contract IDE Workspaces and files
/api/v1/arch/ the Architecture IDE Architecture
/api/v1/public/ attestation verification and shared reports, no credential needed Public

Each operation has exactly one path; when one moves, the old path is removed rather than kept as an alias. See Deprecations.

Janus AI, Protect, Garudon and Radar monitoring have product guides with their own workflows and limits. Their complete operation sets are not part of the generated reference above. Consult the published specification and the product's capability response before building an integration. For a tool-based assistant connection, use MCP.

The resource model

The API is a resource API, not an RPC API. Three consequences are worth internalising before you write a client:

Identifiers live in the path. A call names the thing it acts on — POST /api/v1/workspaces/{workspace_id}/attestations — rather than passing an operation name and an id in a body. On the auditing surface each path parameter's shape is also validated up front, so a malformed address or transaction hash is rejected with 400 validation_failed before anything runs.

Read each creation response's contract. Many POSTs answer 201 Created; the per-endpoint tables in the endpoint reference state which. Keep the returned resource ID and follow Location where the operation documents it. Do not assume every create returns the same headers or body shape.

Some operations are custom methods. Where an action does not map onto a noun, the path ends in :verb — POST /api/v1/bevm/sessions/{uid}/snapshots:restore, POST /api/v1/workbench/operations/{op_id}:cancel, POST /api/v1/public/attestations/verify. The colon may be sent raw or percent-encoded as %3A; both resolve identically.

Beyond that:

  • Every list is paginated the same way. A collection takes page_size (default 50, at most 200 — larger values are clamped, never refused) and page_token, and answers {"data": [...], "has_more", "next_page_token", "page_size"} plus an RFC 8288 Link: rel="next" header. Follow next_page_token until it is null. See Pagination.
  • Conditional requests work end to end. If-None-Match and If-Match are honoured, and ETag, Cache-Control and Vary come back. Use them for polling: a 304 still counts as a request, but it saves you transferring and re-parsing an unchanged body.
  • Some auditing singletons accept current. Several /api/v1/bevm/* resources are singletons keyed by the caller, and there the literal current may stand in for the id to mean "mine" — which is how a first-time caller addresses a resource that has no id yet. This is a property of the auditing surface only: on /api/v1/workspaces/* and the other prefixes an id must be a real UUID, and current is not accepted.
  • Unknown resources answer 404, never 403. An identifier that exists but is not yours is indistinguishable from one that does not exist. This is deliberate: it stops the API confirming that another tenant's resource exists.

The machine-readable specification

An OpenAPI 3.1.0 document is served publicly and needs no authentication:

curl https://api.trilocore.ai/api/v1/meta/openapi.json

Use the returned document as the current published contract. The site reference is a generated snapshot with narrower coverage and can lag that document.

It expands every product namespace above: the EVM and Solana auditing tools, the shared workbench, radar contract search, workspaces, the Contract IDE, architecture and the public verification endpoints. It lists the canonical path of every operation and nothing else. Operations that require an Idempotency-Key declare it, and each session-scoped operation declares the trilocore-session-tag header.

A few prefixes may be described under x-forwarded-prefixes rather than expanded. Check the returned document for the current coverage. A product guide explains its user workflow; it is not a substitute for an operation's request schema.

Choose a supported integration

Use the product guide and published operation contract together. An account may have access to a product while a particular network, action or execution feature is unavailable. Read the capability response and preserve explicit errors in your client instead of treating an unavailable check as an empty successful result.

Where to go next

Authentication Bearer keys, browser sessions, CSRF, and the request headers the API reads
Idempotency The endpoints that require Idempotency-Key, and replay semantics
Errors RFC 9457 problem documents and the full code catalogue
Deprecations What happens when an operation moves, and porting older integrations
Rate limits and quota x-ratelimit-* headers, 429 handling, daily quota
Pagination page_size / page_token, the list envelope, and which lists are not paginated
Endpoint reference The documented operation snapshot, by product namespace