Introduction

Welcome to the Iris AI Testing API documentation. Our API is built using tRPC, providing end-to-end typesafe APIs with great developer experience.

A TypeScript SDK is coming soon to make integration even easier! Stay tuned for updates.

API Structure

All our API endpoints follow a consistent tRPC-based structure:

https://app.tryiris.dev/api/trpc/[router].[procedure]

For example:

  • test.create - Create a new test
  • agent.delete - Delete an AI agent
  • project.update - Update project details

Authentication

All API requests require authentication using your Iris API token. Include it as a header in your requests:

You can obtain your API token from the Iris dashboard under Settings > API Keys.

Request/Response Format

Due to the tRPC architecture, all requests follow a consistent format:

Common Patterns

Batching Requests

tRPC allows batching multiple requests together for better performance:

https://app.tryiris.dev/api/trpc/[procedure1],[procedure2]?batch=1

Many endpoints support an include parameter to fetch related data:

{
  "include": {
    "testRuns": {
      "orderBy": {
        "createdAt": "desc"
      },
      "take": 1
    }
  }
}

Filtering and Searching

Use where clauses for filtering:

{
  "where": {
    "name": {
      "contains": "search-term",
      "mode": "insensitive"
    }
  }
}

Error Handling

401
object

Unauthorized - Invalid or missing API token

404
object

Resource not found

500
object

Internal server error

Type Safety

Our API is built with tRPC, ensuring complete type safety from your API calls to your database. When our TypeScript SDK is released, you’ll get:

  • Full autocompletion
  • Runtime type checking
  • Compile-time type checking
  • Automatic type inference

Available Endpoints

Our API is organized into several main categories:

Even if an endpoint isn’t explicitly documented, it likely exists and follows the same patterns described above. This is because our tRPC backend automatically exposes procedures in a consistent way.