Skip to main content
API Documentation

Raina API Reference

Integrate content authenticity verification into your applications with our REST API.

Getting Started

Quick Start

Make your first API call in minutes. Here's how to verify text content:

const response = await fetch('https://rainaventure.com/api/score', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer rn_YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    contentType: 'text',
    content: 'Text content to verify...',
    scanMode: 'standard'
  })
});

const result = await response.json();
console.log(result.trustScore, result.uasResult);

Enterprise Onboarding

Enterprise customers receive dedicated onboarding support including architecture review, integration planning, and custom SLA configuration.

API Key Setup

Generate API keys from your dashboard. Keys are prefixed with rn_ and should be kept secure. Rotate keys regularly for security.

Rate Limits & Quotas

Rate limits vary by tier: Developer (1 req/sec), Starter (10 req/sec), Professional (35 req/sec), Business (100 req/sec). Contact sales for custom limits.

IP Whitelisting

Enterprise customers can configure IP whitelisting to restrict API access to approved networks only. Configure via dashboard or API.

Authentication

All API requests require authentication. Raina accepts the key via either header — x-api-key is the canonical form and Authorization: Bearer is provided for compatibility with standard HTTP clients. Keys are prefixed with rn_.

Authorization: Bearer rn_YOUR_API_KEY
# or
x-api-key: rn_YOUR_API_KEY

Endpoints

All endpoints are served from the same origin as the dashboard (e.g. https://rainaventure.com). Paths are unversioned; versioning will be announced via deprecation headers before any breaking change.

POST
/api/score
Score text, URL, or image content for authenticity
POST
/api/media-upload
Stream-upload media for deeper forensic analysis
POST
/api/media-scan
Run a media scan on previously uploaded content
GET
/api/sources
List verified sources in the credibility database
GET
/api/sources/lookup
Look up credibility details for a specific source
GET
/api/usage/current
Check current billing-period API usage and quota
GET
/api/scans
List recent scans for the authenticated account

Error Handling

The API uses standard HTTP status codes and returns structured error bodies via sendApiError with an error, code, and requestId field.

400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Key lacks required capability (scan, read, export)
429Rate Limited - See backoff example below
503Service Unavailable - Safe mode or maintenance; retry later
500Server Error - Retry with exponential backoff

429 response & backoff

HTTP/1.1 429 Too Many Requests
Retry-After: 2
Content-Type: application/json

{
  "error": "Rate limit exceeded",
  "code": "RATE_LIMITED",
  "limit": 35,
  "used": 35,
  "requestId": "req_..."
}

Honor Retry-After. For 500/503, retry with exponential backoff (e.g. 1s, 2s, 4s, 8s, jittered, max 5 attempts). Do not retry 400/401/403; fix the request.

Webhooks

Configure webhooks to receive real-time notifications when trust traces complete. Events include:

  • trace.completed
  • trace.failed
  • usage.threshold.reached

SDKs & Libraries

Raina's API is a standard REST interface and works with any HTTP client. Official SDKs are on the roadmap for the languages below; until then, the cURL / fetch / requests examples above are the supported integration path. Contact sales if you need a language binding prioritized.
JavaScript
Planned
Python
Planned
PHP
Planned
Ruby
Planned
Go
Planned
Java
Planned

Enterprise

Enterprise features include advanced capabilities for high-volume deployments:

Batch Processing

Submit up to 1,000 items per request for efficient bulk verification.

Async Verification

Queue long-running trust traces and receive results via webhook.

Custom Integrations

Work with our team to build custom API endpoints for your workflow.

SLA Guarantees

99.9% uptime SLA with financial credits for any downtime.

Need help integrating?

Our solutions team can help you get started with custom integrations.

We value your privacy

We use essential cookies to run the site. With your permission, we also use analytics cookies (PostHog) to improve Raina. Privacy Policy | Terms