Arize Phoenix Sessions API
The sessions API from Arize Phoenix — 5 operation(s) for sessions.
The sessions API from Arize Phoenix — 5 operation(s) for sessions.
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-sessions-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. 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 Sessions API
description: Schema for Arize-Phoenix REST API
version: '1.0'
tags:
- name: Sessions
paths:
/v1/sessions/{session_identifier}:
get:
tags:
- Sessions
summary: Get session by ID or session_id
operationId: getSession
parameters:
- name: session_identifier
in: path
required: true
schema:
type: string
description: 'The session identifier: either a GlobalID or user-provided session_id string.'
title: Session Identifier
description: 'The session identifier: either a GlobalID or user-provided session_id string.'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/GetSessionResponseBody'
'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
delete:
tags:
- Sessions
summary: Delete a session by identifier
description: 'Delete a session by its identifier. The identifier can be either:
1. A global ID (base64-encoded)
2. A user-provided session_id string
This will permanently remove the session and all associated traces, spans, and annotations via cascade delete.'
operationId: deleteSession
parameters:
- name: session_identifier
in: path
required: true
schema:
type: string
description: 'The session identifier: either a GlobalID or user-provided session_id string.'
title: Session Identifier
description: 'The session identifier: either a GlobalID or user-provided session_id string.'
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'
/v1/sessions/delete:
post:
tags:
- Sessions
summary: Bulk delete sessions
description: Delete multiple sessions by their identifiers (GlobalIDs or session_id strings). All identifiers in a single request must be the same type. Non-existent IDs are silently skipped. All associated traces, spans, and annotations are cascade deleted.
operationId: deleteSessions
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteSessionsRequestBody'
required: true
responses:
'204':
description: Successful Response
'403':
description: Forbidden
content:
text/plain:
schema:
type: string
'422':
description: Unprocessable Entity
content:
text/plain:
schema:
type: string
/v1/projects/{project_identifier}/sessions:
get:
tags:
- Sessions
summary: List sessions for a project
operationId: listProjectSessions
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: cursor
in: query
required: false
schema:
type:
- string
- 'null'
description: Cursor for pagination (session ID)
title: Cursor
description: Cursor for pagination (session ID)
- name: limit
in: query
required: false
schema:
type: integer
exclusiveMinimum: 0
description: The max number of sessions to return at a time.
default: 100
title: Limit
description: The max number of sessions to return at a time.
- name: order
in: query
required: false
schema:
enum:
- asc
- desc
type: string
description: 'Sort order by ID: ''asc'' (ascending) or ''desc'' (descending).'
default: asc
title: Order
description: 'Sort order by ID: ''asc'' (ascending) or ''desc'' (descending).'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/GetSessionsResponseBody'
'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/session_annotations:
post:
tags:
- Sessions
summary: Create session annotations
operationId: annotateSessions
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/AnnotateSessionsRequestBody'
responses:
'200':
description: Session annotations inserted successfully
content:
application/json:
schema:
$ref: '#/components/schemas/AnnotateSessionsResponseBody'
'403':
content:
text/plain:
schema:
type: string
description: Forbidden
'404':
content:
text/plain:
schema:
type: string
description: Session not found
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/session_notes:
post:
tags:
- Sessions
summary: Create a session note
description: Add a note annotation to a session. By default each call appends a new note with an auto-generated UUIDv4 identifier, so multiple notes accumulate on the same session. Callers may supply a non-empty `identifier` to upsert on (session_id, name='note', identifier) — repeated calls with the same identifier overwrite the existing note, matching the semantics of structured annotations.
operationId: createSessionNote
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateSessionNoteRequestBody'
required: true
responses:
'200':
description: Session note created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/CreateSessionNoteResponseBody'
'403':
description: Forbidden
content:
text/plain:
schema:
type: string
'404':
description: Session not found
content:
text/plain:
schema:
type: string
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
GetSessionResponseBody:
properties:
data:
$ref: '#/components/schemas/SessionData'
type: object
required:
- data
title: GetSessionResponseBody
GetSessionsResponseBody:
properties:
data:
items:
$ref: '#/components/schemas/SessionData'
type: array
title: Data
next_cursor:
type:
- string
- 'null'
title: Next Cursor
type: object
required:
- data
- next_cursor
title: GetSessionsResponseBody
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
InsertedSessionAnnotation:
properties:
id:
type: string
title: Id
description: The ID of the inserted session annotation
type: object
required:
- id
title: InsertedSessionAnnotation
CreateSessionNoteRequestBody:
properties:
data:
$ref: '#/components/schemas/SessionNoteData'
type: object
required:
- data
title: CreateSessionNoteRequestBody
AnnotateSessionsResponseBody:
properties:
data:
items:
$ref: '#/components/schemas/InsertedSessionAnnotation'
type: array
title: Data
type: object
required:
- data
title: AnnotateSessionsResponseBody
DeleteSessionsRequestBody:
properties:
session_identifiers:
items:
type: string
type: array
title: Session Identifiers
description: 'List of session identifiers to delete. All identifiers must be the same type: either all GlobalIDs or all user-provided session_id strings.'
type: object
required:
- session_identifiers
title: DeleteSessionsRequestBody
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
AnnotateSessionsRequestBody:
properties:
data:
items:
$ref: '#/components/schemas/SessionAnnotationData'
type: array
title: Data
type: object
required:
- data
title: AnnotateSessionsRequestBody
SessionAnnotationData:
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: ''
session_id:
type: string
title: Session Id
description: Session ID
type: object
required:
- name
- annotator_kind
- session_id
title: SessionAnnotationData
CreateSessionNoteResponseBody:
properties:
data:
$ref: '#/components/schemas/InsertedSessionAnnotation'
type: object
required:
- data
title: CreateSessionNoteResponseBody
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
SessionData:
properties:
id:
type: string
title: Id
session_id:
type: string
title: Session 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
traces:
items:
$ref: '#/components/schemas/SessionTraceData'
type: array
title: Traces
token_count_prompt:
type: integer
title: Token Count Prompt
description: Cumulative prompt token count across all spans in the session.
default: 0
token_count_completion:
type: integer
title: Token Count Completion
description: Cumulative completion token count across all spans in the session.
default: 0
token_count_total:
type: integer
title: Token Count Total
description: Cumulative total token count across all spans in the session (prompt + completion).
default: 0
type: object
required:
- id
- session_id
- project_id
- start_time
- end_time
- traces
title: SessionData
SessionNoteData:
properties:
session_id:
type: string
minLength: 1
title: Session Id
description: Session ID
note:
type: string
minLength: 1
title: Note
description: The note text to add to the session
identifier:
type: string
title: Identifier
description: Optional caller-supplied identifier. When non-empty, the note is upserted on (session_id, name='note', identifier) — repeated calls with the same identifier overwrite the existing note. When omitted or empty, the server stamps a unique 'px-session-note:<uuid>' identifier so each call appends a new note.
default: ''
type: object
required:
- session_id
- note
title: SessionNoteData
SessionTraceData:
properties:
id:
type: string
title: Id
trace_id:
type: string
title: Trace Id
start_time:
type: string
format: date-time
title: Start Time
end_time:
type: string
format: date-time
title: End Time
type: object
required:
- id
- trace_id
- start_time
- end_time
title: SessionTraceData