Skip to main content
The Adaline REST API gives you direct HTTP access to the entire platform. Use it when you need to send telemetry from any language, integrate with CI/CD pipelines, build custom tooling, or work from environments where the SDK isn’t available.

What the API covers

The API spans 30+ endpoints across 9 resource types. Logging traces and spans is the most common starting point, but the same API key unlocks the full platform.
ResourceWhat you can do
LogsCreate traces with spans, add spans to existing traces, update traces with feedback or metadata.
DeploymentsFetch deployed prompt configurations (model, messages, tools, variables) by ID or environment.
PromptsCreate, list, get, update, and delete prompts. Manage drafts and playground configurations.
DatasetsCreate and manage evaluation datasets — add columns, insert rows, fetch dynamic columns.
EvaluatorsCreate and configure evaluators (LLM judge, text match, JavaScript, JSON, cost, latency, and more).
EvaluationsRun evaluations against datasets, track progress, retrieve results.
ProjectsList all projects accessible by your API key.
ProvidersList configured AI providers and their available models.
ModelsList all available models, optionally filtered by provider.

Base URL

https://api.adaline.ai/v2
A staging environment is also available at https://api.staging.adaline.ai/v2.

Authentication

All requests require a Bearer token in the Authorization header.
curl -X GET "https://api.adaline.ai/v2/projects" \
  -H "Authorization: Bearer your-api-key"
Get your API key from the Adaline Dashboard under workspace settings. See the Authentication reference for full details. If the key is missing or invalid, the API returns 401 Unauthorized:
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key."
  }
}

Rate limits

Default limits per workspace:
ResourceLimitWindow
Log Trace endpoints60,000 requestsper minute
Log Span endpoints150,000 requestsper minute
Deployment endpoints60,000 requestsper minute
All other endpoints6,000 requestsper minute
When exceeded, the API returns 429 Too Many Requests. See Limits reference for payload size limits.

Create a trace with spans

The primary logging endpoint. Send a trace and its spans in a single request:
curl -X POST https://api.adaline.ai/v2/logs/trace \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "projectId": "your-project-id",
    "trace": {
      "name": "user-request",
      "status": "success",
      "startedAt": 1700000000000,
      "endedAt": 1700000005000,
      "referenceId": "trace-uuid",
      "sessionId": "session-abc123",
      "attributes": {
        "userId": "user-456",
        "environment": "production",
        "featureFlag": "new-prompt-v2"
      },
      "tags": ["production", "v2.1"]
    },
    "spans": [
      {
        "name": "chat-completion",
        "status": "success",
        "startedAt": 1700000001000,
        "endedAt": 1700000004500,
        "referenceId": "span-uuid",
        "promptId": "your-prompt-id",
        "deploymentId": "your-deployment-id",
        "runEvaluation": true,
        "content": {
          "type": "Model",
          "provider": "openai",
          "model": "gpt-4",
          "input": "{\"messages\": [...]}",
          "output": "{\"choices\": [...]}",
          "cost": 0.0032
        },
        "variables": {
          "user_question": {
            "modality": "text",
            "value": "How do I reset my password?"
          }
        },
        "tags": ["llm-call"],
        "attributes": {
          "temperature": 0.7
        }
      }
    ]
  }'
Response (200 OK):
{
  "traceId": "generated-trace-id",
  "spanIds": ["generated-span-id"]
}

Add a span to an existing trace

Append a span to a trace that was created in a previous request:
curl -X POST https://api.adaline.ai/v2/logs/span \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "traceId": "existing-trace-id",
    "projectId": "your-project-id",
    "name": "tool-execution",
    "status": "success",
    "startedAt": 1700000002000,
    "endedAt": 1700000003000,
    "referenceId": "tool-span-uuid",
    "content": {
      "type": "Tool",
      "input": "{\"query\": \"password reset\"}",
      "output": "{\"results\": [...]}"
    }
  }'

Update a trace

Use PATCH to update trace attributes, tags, or status after creation. This is how you log user feedback, add metadata after the fact, or correct a status:
curl -X PATCH https://api.adaline.ai/v2/logs/trace \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "traceId": "existing-trace-id",
    "projectId": "your-project-id",
    "status": "success",
    "attributes": {
      "user_feedback": "positive",
      "user_feedback_comment": "Very helpful!",
      "user_feedback_rating": 5
    },
    "tags": ["thumbs-up"]
  }'

Fetch deployments

Retrieve deployed prompt configurations — model settings, messages, tools, and variables — so your application can use the latest version without redeploying code.
# Fetch a specific deployment
curl -X GET "https://api.adaline.ai/v2/deployments?promptId=your-prompt-id&deploymentId=your-deployment-id" \
  -H "Authorization: Bearer your-api-key"

# Fetch the latest deployment for an environment
curl -X GET "https://api.adaline.ai/v2/deployments?promptId=your-prompt-id&deploymentId=latest&deploymentEnvironmentId=your-env-id" \
  -H "Authorization: Bearer your-api-key"
The response includes the full prompt configuration:
{
  "id": "deployment-id",
  "projectId": "project-id",
  "promptId": "prompt-id",
  "deploymentEnvironmentId": "env-id",
  "prompt": {
    "config": {
      "providerName": "openai",
      "providerId": "provider-id",
      "model": "gpt-4",
      "settings": { "temperature": 0.7, "maxTokens": 1000 }
    },
    "messages": [...],
    "tools": [...],
    "variables": [{ "name": "user_question", "modality": "text" }]
  }
}

Next steps

With Adaline SDKs

Use the TypeScript or Python SDK for automatic buffering, retries, and deployment caching.

API Reference

Full OpenAPI endpoint documentation with request/response schemas.

Log User Feedback

Attach feedback signals to traces via the PATCH endpoint.

Authentication & Limits

API key management, rate limits, and payload constraints.