Introduction
Overview of Iris AI Testing API structure and usage
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:
For example:
test.create
- Create a new testagent.delete
- Delete an AI agentproject.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:
Including Related Data
Many endpoints support an include
parameter to fetch related data:
Filtering and Searching
Use where
clauses for filtering:
Error Handling
Unauthorized - Invalid or missing API token
Resource not found
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.