Overview

Welcome to the IrisOS API documentation. This guide will help you get started with building and managing AI agents through our REST API.

Base URL

All API requests should be made to:

https://api.irisos.xyz/v1

Authentication

IrisOS uses API keys for authentication. Include your API key in the request headers:

Authorization: Bearer YOUR_API_KEY

Getting an API Key

  1. Sign up at irisos.xyz

  2. Navigate to Settings → API Keys

  3. Generate a new API key

  4. Store it securely (it won't be shown again)

Security Best Practices

  • Never commit API keys to version control

  • Use environment variables to store API keys

  • Rotate keys regularly (every 90 days recommended)

  • Use different keys for development and production

  • Revoke unused keys immediately

API Endpoints

Agents

Manage your AI agents:

Characters

Manage agent character configurations (coming soon)

Conversations

Access conversation history and analytics (coming soon)

Plugins

Manage and configure plugins (coming soon)

Request Format

All POST and PATCH requests should include a JSON body with the Content-Type: application/json header:

Response Format

All API responses follow this structure:

Success Response

Error Response

HTTP Status Codes

Status Code
Meaning

200

Success

201

Created

400

Bad Request - Invalid parameters

401

Unauthorized - Invalid or missing API key

403

Forbidden - Insufficient permissions

404

Not Found - Resource doesn't exist

429

Too Many Requests - Rate limit exceeded

500

Internal Server Error

503

Service Unavailable

Rate Limits

Default rate limits apply to all endpoints:

  • Standard tier: 60 requests per minute

  • Pro tier: 300 requests per minute

  • Enterprise tier: Custom limits

Rate limit information is included in response headers:

Handling Rate Limits

When you exceed the rate limit, you'll receive a 429 status code:

Implement exponential backoff:

Pagination

List endpoints support pagination:

Response includes pagination metadata:

Versioning

The API version is included in the URL path:

We maintain backward compatibility within major versions. Breaking changes will result in a new major version (v2, v3, etc.).

SDKs and Libraries

Official SDKs are available for popular languages:

  • JavaScript/TypeScript: npm install @irisos/sdk

  • Python: pip install irisos

  • Go: go get github.com/IrisOS-xyz/irisos-go

  • Ruby: gem install irisos

Quick Start with SDK

Webhooks

Configure webhooks to receive real-time notifications about agent events (coming soon).

Error Codes

Common error codes you may encounter:

Code
Description

INVALID_REQUEST

Request parameters are invalid

UNAUTHORIZED

Invalid or missing API key

AGENT_NOT_FOUND

Requested agent doesn't exist

RATE_LIMIT_EXCEEDED

Too many requests

INSUFFICIENT_QUOTA

Account quota exceeded

AGENT_UNAVAILABLE

Agent is not responding

MODEL_ERROR

AI model provider error

See the Error Codes Reference for complete details.

Support

Need help?

Changelog

Stay updated with API changes:

Last updated