Skip to main content
POST
Annotate a batch of project spans

Authorizations

Authorization
string
header
required

Most Arize AI endpoints require authentication. For those endpoints that require authentication, include your API key in the request header using the format

Body

application/json

Body containing span annotation batch

Batch annotation request for project spans.

project_id
string
required

The project (model) ID whose spans are being annotated.

Example:

"proj_abc123"

annotations
object[]
required

Batch of span annotations to write. Up to 1000 spans per request.

Required array length: 1 - 1000 elements
start_time
string<date-time>

Start of the time range for span lookup. Optional; defaults to 31 days ago.

Example:

"2024-01-01T00:00:00Z"

end_time
string<date-time>

End of the time range for span lookup. Optional; defaults to now.

Example:

"2024-01-08T00:00:00Z"

granularity
enum<string>
default:SPAN

Whether the record is a span or a trace, which affects whether annotations are written as span annotations or trace annotations. Attempts to write trace annotations on spans will be rejected. Optional; defaults to 'SPAN'.

Available options:
SPAN,
TRACE

Response

Annotations accepted. Writes are idempotent; retry on failure is safe.