Skip to main content
POST
/
v0
/
ingest
JavaScript
import Avido from 'avido';

const client = new Avido({
  apiKey: process.env['AVIDO_API_KEY'], // This is the default and can be omitted
  applicationID: process.env['AVIDO_APPLICATION_ID'], // This is the default and can be omitted
});

const ingest = await client.ingest.create({
  events: [
    { type: 'trace' },
    {
      event: 'start',
      input: [{ role: 'user', content: 'Tell me a joke.' }],
      modelId: 'gpt-4o-2024-08-06',
      type: 'llm',
    },
  ],
});

console.log(ingest.data);
{
  "data": [
    {
      "success": true,
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "error": "Failed to write to database"
    }
  ]
}

Authorizations

x-api-key
string
header
required

Your unique Avido API key

x-application-id
string
header
required

Your unique Avido Application ID

Body

application/json

Request schema for ingesting events into the system.

events
Ingest Event · object[]
required

Array of events to be ingested, which can be traces or steps.

An event represents one step in the interaction with your AI application, such as a RAG call, reranker, tool call, LLM trigger, agent orchestration, embedding, guardrail check, evaluator, response, or user request.

Example:
[
  {
    "type": "trace",
    "timestamp": "2025-01-01T12:00:00Z",
    "referenceId": "123e4567-e89b-12d3-a456-426614174000",
    "metadata": { "source": "chatbot" }
  },
  {
    "type": "llm",
    "event": "start",
    "traceId": "123e4567-e89b-12d3-a456-426614174000",
    "timestamp": "2025-01-01T12:01:00Z",
    "modelId": "gpt-4o-2024-08-06",
    "params": { "temperature": 1.2 },
    "input": [
      {
        "role": "user",
        "content": "Tell me a joke."
      }
    ]
  }
]

Response

Successfully ingested events.

Response schema for successful event ingestion.

data
object[]
required

Array of results for each ingested event.