Work with this as data
Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/naturali-ai:naturali-ai-traces-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
OpenAPI Specification
openapi: 3.2.0
info:
title: naturali.ai Traces API
version: 1.0.0
description: The naturali.ai API. This document is the merge of every per-resource spec under openapi/v1/ — the single wire contract for all v1 endpoints.
contact:
name: naturali.ai
url: https://naturali.ai
servers:
- url: https://api.naturali.ai
description: Host of your naturali.ai deployment; every path carries the /v1 prefix.
security:
- bearerAuth: []
- oauth2:
- mcp:access
tags:
- name: Traces
description: Inspect execution traces and trace trees
paths:
/v1/projects/{project_id}/traces:
parameters:
- $ref: '#/components/parameters/ProjectId'
get:
tags:
- Traces
summary: List traces
description: Returns a paginated list of execution traces for the project.
operationId: listTraces
parameters:
- name: parent_trace_id
in: query
required: false
schema:
type: string
example: trace_V1StGXR8Z5jdHi6B
description: Only the direct children of this trace. A trace naming nothing the caller can read matches nothing rather than widening the listing.
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Cursor'
responses:
'200':
description: List of traces
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Page'
- properties:
data:
type: array
items:
$ref: '#/components/schemas/Trace'
'400':
$ref: '#/components/responses/BadRequest'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
$ref: '#/components/responses/ProjectNotFound'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalError'
/v1/projects/{project_id}/traces/{trace_id}:
parameters:
- $ref: '#/components/parameters/ProjectId'
get:
tags:
- Traces
summary: Get a trace
description: Returns a single trace by ID.
operationId: getTrace
parameters:
- name: trace_id
in: path
required: true
schema:
type: string
description: Public ID of the trace
responses:
'200':
description: Trace details
content:
application/json:
schema:
$ref: '#/components/schemas/Trace'
'400':
$ref: '#/components/responses/BadRequest'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Trace not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalError'
/v1/projects/{project_id}/traces/{trace_id}/tree:
parameters:
- $ref: '#/components/parameters/ProjectId'
get:
tags:
- Traces
summary: Get trace tree
description: Returns the full execution tree rooted at the given trace (or its root if the given trace is a child). Each node represents one agent's execution session. The `children` array contains traces triggered by sub-agent tool calls from that trace. A node's generations are listed by `GET /v1/projects/{project_id}/generations?trace_id=`, and a node's direct children page by `GET /v1/projects/{project_id}/traces?parent_trace_id=`.
operationId: getTraceTree
parameters:
- name: trace_id
in: path
required: true
schema:
type: string
description: Public ID of any trace in the tree (root or child)
responses:
'200':
description: Trace tree rooted at the resolved root trace
content:
application/json:
schema:
$ref: '#/components/schemas/TraceTreeNode'
'400':
$ref: '#/components/responses/BadRequest'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Trace not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalError'
/v1/projects/{project_id}/traces/{trace_id}/content:
parameters:
- $ref: '#/components/parameters/ProjectId'
delete:
tags:
- Traces
summary: Purge trace content
description: 'Deletes the trace''s steps object from storage and clears its content columns (`file_id`, `error`), cascading to every descendant trace and to all of their generations. A descendant holds its own steps object covering the same run, so the cascade is what makes the erasure complete rather than merely partial.
The rows survive as auditable skeletons with `content_redacted_at` set — ids, timestamps, step counts, and the generations'' usage-attribution fields are preserved, because the billing and audit ledger must outlive a tenant''s erasure of the content. A purged trace therefore reads back as a skeleton, not a 404: a 404 would prove nothing.
Idempotent — purging an already-purged trace succeeds and leaves the original `content_redacted_at` in place.'
operationId: purgeTraceContent
parameters:
- name: trace_id
in: path
required: true
schema:
type: string
description: Public ID of the trace
responses:
'200':
description: The purged trace skeleton
content:
application/json:
schema:
$ref: '#/components/schemas/Trace'
'400':
$ref: '#/components/responses/BadRequest'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Trace not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalError'
'502':
$ref: '#/components/responses/AdmissionUnavailable'
4XX:
$ref: '#/components/responses/AdmissionRefused'
components:
responses:
TooManyRequests:
description: '`QUOTA_EXCEEDED` — a `requests` quota on the calling API key or its project is spent for the window; `Retry-After` says when it reopens'
headers:
Retry-After:
description: Seconds until the quota window admits a request again
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
BadRequest:
description: The request was malformed or failed validation.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
AdmissionUnavailable:
description: The deployment's admission service is asked about this write and did not answer — `ADMISSION_UNAVAILABLE`; the write did not happen
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
ProjectNotFound:
description: The project does not exist or the caller is not a member of it (`not_found`).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
AdmissionRefused:
description: The deployment's admission service refused this write — answered under the service's own `4xx` status, with its `code` (matching `^[A-Za-z_][A-Za-z0-9_]{0,63}$`, not necessarily an `ERROR_CODES` key), `message` and `meta`; the write did not happen. A status this operation also declares on its own is documented there
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
InternalError:
description: Unexpected server error — `INTERNAL_ERROR`, with the raw message never forwarded
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
parameters:
ProjectId:
name: project_id
in: path
required: true
description: Project public ID (proj_ prefix).
schema:
type: string
example: proj_V1StGXR8Z5jdHi6B
Limit:
name: limit
in: query
required: false
description: Results per page, 1 to 100 (default 50). Above 100 it is clamped; below 1 or not an integer it is `400`.
schema:
type: integer
minimum: 1
maximum: 100
default: 50
Cursor:
name: cursor
in: query
required: false
description: The previous page's `next_cursor`; omit it for the first page. A cursor this list did not issue is `400`.
schema:
type: string
schemas:
PrincipalType:
type: string
enum:
- user
- api_key
- agent
- automation
- approval
- trigger
- system
- eval
- decider
- ingestion_rule
- memory_rule
- playbook_version
description: What kind of principal acted. `user` and `api_key` are authenticated callers, and the id is the user's (`user_…`) or the key's own (`key_…`), so a record names which key acted rather than its owner. `agent` is an agent writing under its own identity (`agent_…`). `automation` is the task engine acting on a dispatch outcome and `approval` an approval resolution; neither carries an id. `trigger` is a trigger firing under its own `policy_ids` (`trg_…`). `system` is the platform itself, with an id naming the mechanism (`retention_sweep`, `zero_retention`). `eval`, `decider`, `ingestion_rule`, `memory_rule` and `playbook_version` are that resource's work running under its own `policy_ids` when nobody started it, the id its own.
example: user
Page:
type: object
description: One page of a list. Rows inserted or removed between two calls neither repeat nor skip a row on the next page.
required:
- data
- next_cursor
properties:
data:
type: array
description: This page's items, in the list's order.
items: {}
next_cursor:
type:
- string
- 'null'
description: Pass as `cursor` to fetch the next page; `null` on the last page.
ErrorResponse:
type: object
required:
- error
properties:
error:
type: object
description: Structured error. Every error response uses this shape, so `code` can be read without first checking the type of `error`.
required:
- code
- message
properties:
code:
type: string
description: 'Machine-readable error code: lower_snake for an error naturali raises (`access_denied`), UPPER_SNAKE for one the runtime reports (`RESOURCE_NOT_FOUND`).'
example: access_denied
message:
type: string
description: Human-readable explanation.
example: Your role in this project does not carry this action.
details:
type: object
additionalProperties: true
description: Structured context for an error naturali raises, such as the `resource` and `limit` of a `plan_limit_reached`.
meta:
type: object
description: Structured context for an error the runtime reports.
TraceTreeNode:
type: object
description: A trace node in the execution tree, with nested children.
properties:
id:
type: string
description: Public ID of the trace
project_id:
x-naturali-ref: projects
type: string
agent_id:
x-naturali-ref: agents
type: string
file_id:
x-naturali-ref: files
type:
- string
- 'null'
step_count:
type: integer
parent_trace_id:
x-naturali-ref: traces
type:
- string
- 'null'
root_trace_id:
x-naturali-ref: traces
type:
- string
- 'null'
error:
allOf:
- $ref: '#/components/schemas/StoredError'
description: Why a generation in this trace failed
created_at:
type: string
format: date-time
content_redacted_at:
type:
- string
- 'null'
format: date-time
description: 'When the trace''s content was purged. Non-null means the steps object has been deleted from storage and the content columns cleared, while this row survives as an auditable skeleton (ids, timestamps, step count). A purged trace still reads back as a skeleton with this marker set rather than as a 404, so the erasure is provable.
'
content_redacted_by_principal_type:
allOf:
- $ref: '#/components/schemas/PrincipalType'
description: 'Who purged the content: `user` or `api_key` for a purge request, `system` for the retention sweep and for content never stored under zero retention.'
content_redacted_by_principal_id:
type:
- string
- 'null'
description: Public id of that principal — the API key's own id for key auth, so the record names which key acted. `retention_sweep` or `zero_retention` for `system`.
example: user_V1StGXR8Z5jdHi6B
children:
type: array
description: Child traces triggered by sub-agent calls from this trace
items:
$ref: '#/components/schemas/TraceTreeNode'
StoredError:
type: object
description: Why a resource's work failed, in the shape of an error response's `error`. Every `error` field a resource records carries it, so `code` can be read without first checking the type of `error`.
required:
- code
- message
properties:
code:
type: string
description: A key from the server's ERROR_CODES registry, documented on the Error Codes page. `INTERNAL_ERROR`, with the message `Internal Server Error`, records an unexpected failure whose detail reaches the server log only.
example: AI_PROVIDER_ERROR
message:
type: string
example: 'Provider returned 402: insufficient credits'
meta:
type: object
additionalProperties: true
description: The failure's own structured context, when it names any.
Trace:
type: object
properties:
id:
type: string
description: Public ID of the trace
example: trace_V1StGXR8Z5jdHi6B
project_id:
x-naturali-ref: projects
type: string
description: Public ID of the project
agent_id:
x-naturali-ref: agents
type: string
description: Public ID of the agent that produced this trace
file_id:
x-naturali-ref: files
type:
- string
- 'null'
description: 'Public ID of the File containing the full serialized steps JSON. Null if the trace has not been saved yet (save is fire-and-forget).
'
example: file_xyz789
step_count:
type: integer
description: Number of steps recorded in this trace
example: 2
parent_trace_id:
x-naturali-ref: traces
type:
- string
- 'null'
description: 'Public ID of the parent trace. Null if this trace is the root (i.e., it was not triggered by a sub-agent call from another trace).
'
root_trace_id:
x-naturali-ref: traces
type:
- string
- 'null'
description: 'Public ID of the root trace for the entire execution tree. Null if this trace is itself the root.
'
error:
allOf:
- $ref: '#/components/schemas/StoredError'
description: Why a generation in this trace failed (e.g. an upstream AI provider error). Null if no failure has been recorded.
content_redacted_at:
type:
- string
- 'null'
format: date-time
description: 'When the trace''s content was purged. Non-null means the steps object has been deleted from storage and the content columns cleared, while this row survives as an auditable skeleton (ids, timestamps, step count). A purged trace still reads back as a skeleton with this marker set rather than as a 404, so the erasure is provable.
'
content_redacted_by_principal_type:
allOf:
- $ref: '#/components/schemas/PrincipalType'
description: 'Who purged the content: `user` or `api_key` for a purge request, `system` for the retention sweep and for content never stored under zero retention.'
content_redacted_by_principal_id:
type:
- string
- 'null'
description: Public id of that principal — the API key's own id for key auth, so the record names which key acted. `retention_sweep` or `zero_retention` for `system`.
example: user_V1StGXR8Z5jdHi6B
created_at:
type: string
format: date-time
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: A naturali API key (nat_sk_…) or a session JWT.
oauth2:
type: oauth2
description: 'A connected app''s OAuth access token, issued by this API''s authorization server (discovery: /.well-known/oauth-authorization-server). Its one scope carries every operation, confined to the projects the user chose when approving the app.'
flows:
authorizationCode:
authorizationUrl: https://api.naturali.ai/authorize
tokenUrl: https://api.naturali.ai/token
refreshUrl: https://api.naturali.ai/token
scopes:
mcp:access: Every operation this API serves, on the projects the grant covers.