Getting Started
You will need your athina API key from the Athina dashboard to do tracing via API. All API requests require authentication using an API key. Include your API key in the header of each request:Requirements
For a trace to be visible in the Athina UI, it must contain at least one span with
span_type: "generation".
Traces without any generation spans will be stored but won’t appear in the UI currently.Base URL
The base URL is:https://api.athina.ai for all the following endpoints.
Endpoints
1. Create Trace
Create a new trace for your application.- URL:
/api/v1/trace/ - Method:
POST - Body:
- Response: Returns the created trace object with a unique
id.
2. Get Trace
Retrieve a trace by its ID.- URL:
/api/v1/trace/{trace_id} - Method:
GET - Response: Returns the trace object with all its spans.
3. Update Trace
Update an existing trace.- URL:
/api/v1/trace/{trace_id} - Method:
PUT - Body:
- Response: Returns the updated trace object.
4. Create Span
Create a new span within a trace.- URL:
/api/v1/trace/{trace_id}/spans - Method:
POST - Body:
- Response: Returns the created span object.
5. Get Span
Retrieve a span by its ID within a trace.- URL:
/api/v1/trace/{trace_id}/spans/{span_id} - Method:
GET - Response: Returns the span object.
6. Update Span
Update an existing span within a trace.- URL:
/api/v1/trace/{trace_id}/spans/{span_id} - Method:
PUT - Body:
- Response: Returns the updated span object.