API Documentation

Integrate powerful AI capabilities into your applications with the OOretz API. Access multiple AI models, research tools, and specialized labs through a single unified interface.

Quick Start

Endpoints

SDKs

📦JavaScript
🐍Python
🔷Go
View all SDKs →

Authentication

All API requests require authentication using a Bearer token. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Get your API key from the Dashboard after signing up for a Pro or Enterprise plan.

Rate Limits

PlanRequests/minuteRequests/month
Free101,000
Pro6010,000
EnterpriseCustomUnlimited
POST/api/chat

Send a message to an AI model and receive a response

Parameters

NameTypeRequiredDescription
modelstringThe AI model to use (gpt-4, claude-3, gemini-pro, etc.)
messagesarrayArray of message objects with role and content
temperaturenumberRandomness of output (0-2, default 0.7)
maxTokensnumberMaximum tokens in response (default 2048)

Example Request

curl -X POST https://api.ooretz.space/v1/chat \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4",
    "messages": [
      {"role": "user", "content": "Explain quantum computing"}
    ],
    "temperature": 0.7
  }'

Example Response

{
  "id": "chat-abc123",
  "model": "gpt-4",
  "content": "Quantum computing is a type of computation...",
  "usage": {
    "prompt_tokens": 12,
    "completion_tokens": 150,
    "total_tokens": 162
  }
}

Official SDKs

Use our official SDKs for easier integration in your preferred language:

📦JavaScript
npm install @ooretz/sdk
🐍Python
pip install ooretz
🔷Go
go get github.com/ooretz/go-sdk
💎Ruby
gem install ooretz
🐘PHP
composer require ooretz/sdk
Java
implementation "space.ooretz:sdk:1.0.0"

Error Handling

The API uses standard HTTP status codes. Errors include a JSON body with details:

200Success
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
429Rate Limited - Too many requests
500Server Error - Try again later