Skip to main content

Overview

Raily is built around four core concepts that work together to give you complete control over your content in the AI era:

Content

Your articles, documents, images, and other digital assets

Policies

Rules that control who can access your content and how

Access Requests

When AI systems request permission to use your content

Analytics

Insights into how your content is being used

Content

Content is the foundation of Raily. It represents any digital asset you want to protect and monetize.

Content Structure

Every piece of content in Raily has:
FieldDescriptionExample
idUnique Raily identifiercnt_abc123xyz
externalIdYour internal identifierarticle-456
titleHuman-readable name”Q4 Market Report”
typeContent categoryarticle, report, image
sourceOriginal locationhttps://example.com/...
metadataCustom attributesAuthor, date, tags
policyIdApplied access policypol_xyz789

Content Types

Raily supports various content types, each optimized for different use cases:
Text-based content like news articles, blog posts, and editorial content.
const article = await raily.content.create({
  type: "article",
  title: "Breaking: AI Regulation Update",
  source: "https://news.example.com/ai-regulation",
  metadata: {
    author: "John Doe",
    section: "Technology",
    publishedAt: "2024-01-20T10:00:00Z"
  }
});
Long-form documents like research papers, whitepapers, and industry reports.
const report = await raily.content.create({
  type: "report",
  title: "2024 AI Industry Analysis",
  source: "https://research.example.com/ai-2024.pdf",
  metadata: {
    pages: 150,
    price: 499,
    category: "Premium Research"
  }
});
Visual content including photos, illustrations, and graphics.
const image = await raily.content.create({
  type: "image",
  title: "Product Photography - Series A",
  source: "https://cdn.example.com/photos/product-a.jpg",
  metadata: {
    resolution: "4000x3000",
    license: "commercial",
    photographer: "Jane Smith"
  }
});
Structured data collections for AI training and analysis.
const dataset = await raily.content.create({
  type: "dataset",
  title: "Customer Sentiment Analysis Dataset",
  source: "s3://datasets/sentiment-v2.parquet",
  metadata: {
    records: 1000000,
    features: ["text", "sentiment", "confidence"],
    version: "2.0"
  }
});

Content Lifecycle

1

Create

Register content with Raily via API or dashboard
2

Active

Content is available for access requests and policy enforcement
3

Archive

Temporarily disable access while preserving history
4

Delete

Permanently remove content and associated data

Policies

Policies are the rules that govern how AI systems can access your content. They’re powerful, flexible, and designed for complex real-world scenarios.

Policy Structure

{
  id: "pol_xyz789",
  name: "Enterprise Access Policy",
  description: "Controls access for enterprise AI partners",
  rules: [
    {
      action: "allow",
      priority: 1,
      conditions: { /* when this rule applies */ },
      permissions: [ /* what the requester can do */ ],
      rateLimit: { /* usage limits */ }
    },
    // ... more rules
  ],
  defaultAction: "deny"
}

Rule Evaluation

Rules are evaluated in priority order. The first matching rule determines the outcome.

Conditions

Conditions determine when a rule applies:
conditions: {
  requesterId: ["partner_openai", "partner_anthropic"],
  requesterType: "ai_provider"
}

Permissions

Permissions define what actions are allowed:
PermissionDescription
full_accessComplete content access
preview_onlyLimited preview (first 500 chars)
metadata_onlyAccess to metadata, not content
commercial_useCan use in commercial applications
trainingCan use for AI model training
inferenceCan use for AI inference only

Rate Limiting

Control usage volume to prevent abuse and manage costs:
rateLimit: {
  requests: 1000,      // Maximum requests
  period: "hour",      // Time window: minute, hour, day, month
  burst: 100,          // Allow short bursts above limit
  scope: "requester"   // Apply per requester or globally
}

Policy Example: Tiered Access

const tieredPolicy = await raily.policies.create({
  name: "Tiered Content Access",
  rules: [
    // Enterprise: Full access, high limits
    {
      action: "allow",
      priority: 1,
      conditions: { licenseType: "enterprise" },
      permissions: ["full_access", "commercial_use", "training"],
      rateLimit: { requests: 10000, period: "hour" }
    },
    // Professional: Full access, moderate limits
    {
      action: "allow",
      priority: 2,
      conditions: { licenseType: "professional" },
      permissions: ["full_access", "commercial_use"],
      rateLimit: { requests: 1000, period: "hour" }
    },
    // Basic: Preview only, low limits
    {
      action: "allow",
      priority: 3,
      conditions: { licenseType: "basic" },
      permissions: ["preview_only"],
      rateLimit: { requests: 100, period: "day" }
    },
    // Default: Deny all others
    {
      action: "deny",
      priority: 99,
      conditions: { default: true },
      message: "Please obtain a license to access this content"
    }
  ]
});

Access Requests

When an AI system wants to use your content, it sends an access request. Raily evaluates the request against your policies and returns a decision.

Request Flow

Request Structure

const request = await raily.access.check({
  contentId: "cnt_abc123",
  requesterId: "partner_openai",
  context: {
    purpose: "inference",
    model: "gpt-4",
    userAgent: "OpenAI-API/1.0",
    ipAddress: "192.168.1.1"
  }
});

Response Types

{
  allowed: true,
  contentUrl: "https://cdn.raily.ai/...",
  token: "ey...",
  expiresAt: "2024-01-20T11:00:00Z",
  permissions: ["full_access", "inference"],
  rateLimit: {
    remaining: 999,
    resetAt: "2024-01-20T11:00:00Z"
  }
}

Analytics

Raily provides comprehensive analytics to help you understand how your content is being used and optimize your monetization strategy.

Key Metrics

Request Volume

Total access requests, broken down by granted vs denied

Top Requesters

Which AI systems are requesting your content most

Popular Content

Your most-requested content pieces

Revenue

Earnings from licensed access

Usage Analytics

const usage = await raily.analytics.usage({
  period: "30d",
  groupBy: "day"
});

// Returns:
{
  totalRequests: 45230,
  allowed: 42100,
  denied: 3130,
  uniqueRequesters: 15,
  byDay: [
    { date: "2024-01-01", requests: 1520, allowed: 1480, denied: 40 },
    { date: "2024-01-02", requests: 1610, allowed: 1550, denied: 60 },
    // ...
  ],
  topContent: [
    { id: "cnt_abc", title: "AI Report 2024", requests: 8500 },
    { id: "cnt_def", title: "Market Analysis", requests: 6200 }
  ],
  topRequesters: [
    { id: "partner_openai", requests: 25000 },
    { id: "partner_anthropic", requests: 12000 }
  ]
}

Revenue Analytics

const revenue = await raily.analytics.revenue({
  period: "30d",
  currency: "USD"
});

// Returns:
{
  totalRevenue: 15420.00,
  byLicenseType: {
    enterprise: 12000.00,
    professional: 3000.00,
    basic: 420.00
  },
  byContent: [
    { id: "cnt_abc", title: "AI Report 2024", revenue: 8500.00 },
    { id: "cnt_def", title: "Market Analysis", revenue: 4200.00 }
  ],
  growth: {
    vsLastPeriod: 0.15,  // 15% increase
    trend: "up"
  }
}

Putting It All Together

Here’s how these concepts work together in a real-world scenario:
1

Publisher Registers Content

A news publisher adds their premium articles to Raily
2

Publisher Creates Policy

They set up a policy allowing licensed AI partners to access content
3

AI System Requests Access

An AI company wants to use the articles for their chatbot
4

Raily Evaluates Request

Raily checks if the AI company has a valid license
5

Access Granted

If licensed, Raily provides secure access to the content
6

Analytics Recorded

Every access is logged for reporting and billing
7

Publisher Gets Paid

Based on usage, the publisher receives revenue

Next Steps