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.
Authentication
All API requests require authentication using a Bearer token. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYGet your API key from the Dashboard after signing up for a Pro or Enterprise plan.
Rate Limits
| Plan | Requests/minute | Requests/month |
|---|---|---|
| Free | 10 | 1,000 |
| Pro | 60 | 10,000 |
| Enterprise | Custom | Unlimited |
POST
/api/chatSend a message to an AI model and receive a response
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| model | string | ✓ | The AI model to use (gpt-4, claude-3, gemini-pro, etc.) |
| messages | array | ✓ | Array of message objects with role and content |
| temperature | number | — | Randomness of output (0-2, default 0.7) |
| maxTokens | number | — | Maximum 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