Arize Phoenix Traces API
The traces API from Arize Phoenix — 4 operation(s) for traces.
The traces API from Arize Phoenix — 4 operation(s) for traces.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/phoenix:phoenix-traces-api"
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.
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: 3.2.0
info:
title: Arize-Phoenix REST Traces API
description: Schema for Arize-Phoenix REST API
version: '1.0'
tags:
- name: Traces
paths:
/v1/projects/{project_identifier}/traces:
get:
tags:
- Traces
summary: List traces for a project
operationId: listProjectTraces
parameters:
- name: project_identifier
in: path
required: true
schema:
type: string
description: 'The project identifier: either project ID or project name.'
title: Project Identifier
description: 'The project identifier: either project ID or project name.'
- name: start_time
in: query
required: false
schema:
type:
- string
- 'null'
format: date-time
description: Inclusive lower bound on trace start time (ISO 8601)
title: Start Time
description: Inclusive lower bound on trace start time (ISO 8601)
- name: end_time
in: query
required: false
schema:
type:
- string
- 'null'
format: date-time
description: Exclusive upper bound on trace start time (ISO 8601)
title: End Time
description: Exclusive upper bound on trace start time (ISO 8601)
- name: sort
in: query
required: false
schema:
enum:
- start_time
- latency_ms
type: string
description: Sort field
default: start_time
title: Sort
description: Sort field
- name: order
in: query
required: false
schema:
enum:
- asc
- desc
type: string
description: Sort direction
default: desc
title: Order
description: Sort direction
- name: limit
in: query
required: false
schema:
type: integer
maximum: 1000
exclusiveMinimum: 0
description: Maximum number of traces to return
default: 100
title: Limit
description: Maximum number of traces to return
- name: cursor
in: query
required: false
schema:
type:
- string
- 'null'
description: Pagination cursor (Trace GlobalID)
title: Cursor
description: Pagination cursor (Trace GlobalID)
- name: include_spans
in: query
required: false
schema:
type: boolean
description: If true, include full span details for each trace. This significantly increases response size and query latency, especially with large page sizes. Prefer fetching spans lazily for individual traces when possible.
default: false
title: Include Spans
description: If true, include full span details for each trace. This significantly increases response size and query latency, especially with large page sizes. Prefer fetching spans lazily for individual traces when possible.
- name: session_identifier
in: query
required: false
schema:
type:
- array
- 'null'
items:
type: string
description: List of session identifiers to filter traces by. Each value can be either a session_id string or a session GlobalID. Only traces belonging to the specified sessions will be returned.
title: Session Identifier
description: List of session identifiers to filter traces by. Each value can be either a session_id string or a session GlobalID. Only traces belonging to the specified sessions will be returned.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/GetTracesResponseBody'
'403':
content:
text/plain:
schema:
type: string
description: Forbidden
'404':
content:
text/plain:
schema:
type: string
description: Not Found
'422':
content:
text/plain:
schema:
type: string
description: Unprocessable Entity
/v1/trace_annotations:
post:
tags:
- Traces
summary: Create trace annotations
operationId: annotateTraces
parameters:
- name: sync
in: query
required: false
schema:
type: boolean
description: If true, fulfill request synchronously.
default: false
title: Sync
description: If true, fulfill request synchronously.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AnnotateTracesRequestBody'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AnnotateTracesResponseBody'
'403':
content:
text/plain:
schema:
type: string
description: Forbidden
'404':
content:
text/plain:
schema:
type: string
description: Trace not found
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/trace_notes:
post:
tags:
- Traces
summary: Create a trace note
description: Add a note annotation to a trace. By default each call appends a new note with an auto-generated UUIDv4 identifier, so multiple notes accumulate on the same trace. Callers may supply a non-empty `identifier` to upsert on (trace_id, name='note', identifier) — repeated calls with the same identifier overwrite the existing note, matching the semantics of structured annotations.
operationId: createTraceNote
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTraceNoteRequestBody'
required: true
responses:
'200':
description: Trace note created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTraceNoteResponseBody'
'403':
description: Forbidden
content:
text/plain:
schema:
type: string
'404':
description: Trace not found
content:
text/plain:
schema:
type: string
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/traces/{trace_identifier}:
delete:
tags:
- Traces
summary: Delete a trace by identifier
description: 'Delete an entire trace by its identifier. The identifier can be either:
1. A Relay node ID (base64-encoded)
2. An OpenTelemetry trace_id (hex string)
This will permanently remove all spans in the trace and their associated data.'
operationId: deleteTrace
parameters:
- name: trace_identifier
in: path
required: true
schema:
type: string
description: 'The trace identifier: either a relay GlobalID or OpenTelemetry trace_id'
title: Trace Identifier
description: 'The trace identifier: either a relay GlobalID or OpenTelemetry trace_id'
responses:
'204':
description: Successful Response
'403':
content:
text/plain:
schema:
type: string
description: Forbidden
'404':
content:
text/plain:
schema:
type: string
description: Not Found
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
AnnotationResult:
properties:
label:
type:
- string
- 'null'
title: Label
description: The label assigned by the annotation
score:
type:
- number
- 'null'
title: Score
description: The score assigned by the annotation
explanation:
type:
- string
- 'null'
title: Explanation
description: Explanation of the annotation result
type: object
title: AnnotationResult
GetTracesResponseBody:
properties:
data:
items:
$ref: '#/components/schemas/TraceData'
type: array
title: Data
next_cursor:
type:
- string
- 'null'
title: Next Cursor
type: object
required:
- data
- next_cursor
title: GetTracesResponseBody
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
CreateTraceNoteResponseBody:
properties:
data:
$ref: '#/components/schemas/InsertedTraceAnnotation'
type: object
required:
- data
title: CreateTraceNoteResponseBody
CreateTraceNoteRequestBody:
properties:
data:
$ref: '#/components/schemas/TraceNoteData'
type: object
required:
- data
title: CreateTraceNoteRequestBody
TraceSpanData:
properties:
id:
type: string
title: Id
span_id:
type: string
title: Span Id
parent_id:
type:
- string
- 'null'
title: Parent Id
name:
type: string
title: Name
span_kind:
type: string
title: Span Kind
status_code:
type: string
title: Status Code
start_time:
type: string
format: date-time
title: Start Time
end_time:
type: string
format: date-time
title: End Time
type: object
required:
- id
- span_id
- parent_id
- name
- span_kind
- status_code
- start_time
- end_time
title: TraceSpanData
TraceData:
properties:
id:
type: string
title: Id
trace_id:
type: string
title: Trace Id
project_id:
type: string
title: Project Id
start_time:
type: string
format: date-time
title: Start Time
end_time:
type: string
format: date-time
title: End Time
token_count_prompt:
type: integer
title: Token Count Prompt
description: Cumulative prompt token count across all spans in the trace.
default: 0
token_count_completion:
type: integer
title: Token Count Completion
description: Cumulative completion token count across all spans in the trace.
default: 0
token_count_total:
type: integer
title: Token Count Total
description: Cumulative total token count across all spans in the trace (prompt + completion).
default: 0
spans:
items:
$ref: '#/components/schemas/TraceSpanData'
type:
- array
- 'null'
title: Spans
type: object
required:
- id
- trace_id
- project_id
- start_time
- end_time
title: TraceData
AnnotateTracesRequestBody:
properties:
data:
items:
$ref: '#/components/schemas/TraceAnnotationData'
type: array
title: Data
description: The trace annotations to be upserted
type: object
required:
- data
title: AnnotateTracesRequestBody
InsertedTraceAnnotation:
properties:
id:
type: string
title: Id
description: The ID of the inserted trace annotation
type: object
required:
- id
title: InsertedTraceAnnotation
AnnotateTracesResponseBody:
properties:
data:
items:
$ref: '#/components/schemas/InsertedTraceAnnotation'
type: array
title: Data
type: object
required:
- data
title: AnnotateTracesResponseBody
TraceNoteData:
properties:
trace_id:
type: string
minLength: 1
title: Trace Id
description: OpenTelemetry Trace ID (hex format w/o 0x prefix)
note:
type: string
minLength: 1
title: Note
description: The note text to add to the trace
identifier:
type: string
title: Identifier
description: Optional caller-supplied identifier. When non-empty, the note is upserted on (trace_id, name='note', identifier) — repeated calls with the same identifier overwrite the existing note. When omitted or empty, the server stamps a unique 'px-trace-note:<uuid>' identifier so each call appends a new note.
default: ''
type: object
required:
- trace_id
- note
title: TraceNoteData
TraceAnnotationData:
properties:
name:
type: string
title: Name
description: The name of the annotation
annotator_kind:
type: string
enum:
- LLM
- CODE
- HUMAN
title: Annotator Kind
description: The kind of annotator used for the annotation
result:
$ref: '#/components/schemas/AnnotationResult'
description: The result of the annotation
metadata:
additionalProperties: true
type:
- object
- 'null'
title: Metadata
description: Metadata for the annotation
identifier:
type: string
title: Identifier
description: The identifier of the annotation. If provided, the annotation will be updated if it already exists.
default: ''
trace_id:
type: string
title: Trace Id
description: OpenTelemetry Trace ID (hex format w/o 0x prefix)
type: object
required:
- name
- annotator_kind
- trace_id
title: TraceAnnotationData