Eve library

Content Service API

Guide

Revision 1

On this page

REST API documentation for the Aphrodite Content Service.

Base URL: https://api.aphrodite.example.com/api/v1/content Port: 7001 Authentication: JWT Bearer Token


Table of Contents#

  1. Media Upload
  2. Content Management
  3. Photo Sets
  4. Video on Demand (VOD)
  5. Content Licensing

Media Upload#

Get Presigned Upload URL#

Request a presigned URL for direct upload to storage.

http
POST /media/upload/presigned
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "filename": "photo001.jpg",
  "contentType": "image/jpeg",
  "fileSize": 2048576
}

Response (200 OK):

json
{
  "success": true,
  "data": {
    "uploadId": "upl_abc123",
    "presignedUrl": "https://s3.amazonaws.com/aphrodite-content/...",
    "fields": {
      "key": "uploads/usr_abc123/upl_abc123/photo001.jpg",
      "Content-Type": "image/jpeg",
      "x-amz-meta-user-id": "usr_abc123"
    },
    "expiresAt": "2026-01-18T13:00:00.000Z"
  }
}

Constraints:

Content Type Max Size Allowed Extensions
Images 50 MB jpg, jpeg, png, gif, webp
Videos 5 GB mp4, webm, mov
Audio 100 MB mp3, wav, ogg

Confirm Upload#

After uploading to presigned URL, confirm completion.

http
POST /media/upload/:uploadId/confirm
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "checksum": "sha256:abc123..."
}

Response (200 OK):

json
{
  "success": true,
  "data": {
    "mediaId": "med_xyz789",
    "uploadId": "upl_abc123",
    "status": "processing",
    "processingTasks": [
      { "task": "thumbnail_generation", "status": "pending" },
      { "task": "moderation_scan", "status": "pending" }
    ]
  }
}

Get Upload Status#

http
GET /media/upload/:uploadId/status
Authorization: Bearer <access_token>

Response (200 OK):

json
{
  "success": true,
  "data": {
    "uploadId": "upl_abc123",
    "mediaId": "med_xyz789",
    "status": "completed",
    "processingTasks": [
      { "task": "thumbnail_generation", "status": "completed" },
      {
        "task": "moderation_scan",
        "status": "completed",
        "result": "approved"
      },
      { "task": "transcoding", "status": "completed" }
    ],
    "media": {
      "id": "med_xyz789",
      "type": "image",
      "url": "https://cdn.aphrodite.example.com/media/med_xyz789.jpg",
      "thumbnailUrl": "https://cdn.aphrodite.example.com/thumbnails/med_xyz789.jpg",
      "width": 1920,
      "height": 1080,
      "size": 2048576,
      "duration": null
    }
  }
}

Multipart Upload (Large Files)#

Initialize Multipart Upload#

http
POST /media/upload/multipart/init
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "filename": "stream_recording.mp4",
  "contentType": "video/mp4",
  "fileSize": 5368709120,
  "partSize": 104857600
}

Response (200 OK):

json
{
  "success": true,
  "data": {
    "uploadId": "mpu_abc123",
    "partCount": 52,
    "partSize": 104857600,
    "parts": [
      {
        "partNumber": 1,
        "presignedUrl": "https://s3.amazonaws.com/...",
        "expiresAt": "2026-01-18T14:00:00.000Z"
      }
    ]
  }
}

Get Part Upload URLs#

http
GET /media/upload/multipart/:uploadId/parts?from=2&to=10
Authorization: Bearer <access_token>

Response (200 OK):

json
{
  "success": true,
  "data": {
    "parts": [
      { "partNumber": 2, "presignedUrl": "https://s3.amazonaws.com/..." },
      { "partNumber": 3, "presignedUrl": "https://s3.amazonaws.com/..." }
    ]
  }
}

Complete Multipart Upload#

http
POST /media/upload/multipart/:uploadId/complete
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "parts": [
    { "partNumber": 1, "etag": "abc123" },
    { "partNumber": 2, "etag": "def456" }
  ]
}

Response (200 OK):

json
{
  "success": true,
  "data": {
    "mediaId": "med_video123",
    "status": "processing"
  }
}

Content Management#

Create Content Item#

http
POST /content-store
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "title": "Exclusive Photo Set",
  "description": "My latest exclusive photo shoot",
  "type": "photoset",
  "visibility": "paid",
  "price": 50,
  "currency": "tokens",
  "mediaIds": ["med_1", "med_2", "med_3"],
  "thumbnailId": "med_1",
  "tags": ["exclusive", "photoshoot"],
  "scheduledPublishAt": null
}

Response (201 Created):

json
{
  "success": true,
  "data": {
    "id": "cnt_abc123",
    "title": "Exclusive Photo Set",
    "description": "My latest exclusive photo shoot",
    "type": "photoset",
    "visibility": "paid",
    "price": 50,
    "currency": "tokens",
    "status": "published",
    "creatorId": "usr_xyz789",
    "media": [
      { "id": "med_1", "type": "image", "thumbnailUrl": "..." },
      { "id": "med_2", "type": "image", "thumbnailUrl": "..." }
    ],
    "thumbnail": {
      "url": "https://cdn.aphrodite.example.com/thumbnails/med_1.jpg"
    },
    "stats": {
      "views": 0,
      "purchases": 0,
      "likes": 0
    },
    "tags": ["exclusive", "photoshoot"],
    "createdAt": "2026-01-18T12:00:00.000Z",
    "publishedAt": "2026-01-18T12:00:00.000Z"
  }
}

Content Types:

Type Description
post Single media post
photoset Collection of images
video Single video
vod Video on demand (longer form)
audio Audio content
article Text-based content with media

Visibility Options:

Visibility Description
public Visible to everyone
followers Only followers can view
subscribers Only subscribers can view
paid Requires one-time purchase
private Only creator can view (draft)

Get Content Item#

http
GET /content-store/:contentId
Authorization: Bearer <access_token>

Response (200 OK):

json
{
  "success": true,
  "data": {
    "id": "cnt_abc123",
    "title": "Exclusive Photo Set",
    "description": "My latest exclusive photo shoot",
    "type": "photoset",
    "visibility": "paid",
    "price": 50,
    "currency": "tokens",
    "status": "published",
    "creator": {
      "id": "usr_xyz789",
      "username": "janedoe",
      "displayName": "Jane Doe",
      "avatarUrl": "https://cdn.aphrodite.example.com/avatars/usr_xyz789.jpg"
    },
    "thumbnail": {
      "url": "https://cdn.aphrodite.example.com/thumbnails/med_1.jpg"
    },
    "preview": [
      { "id": "med_1", "type": "image", "url": "...", "blurred": true }
    ],
    "hasAccess": false,
    "stats": {
      "views": 1250,
      "purchases": 42,
      "likes": 156
    },
    "tags": ["exclusive", "photoshoot"],
    "createdAt": "2026-01-18T12:00:00.000Z",
    "publishedAt": "2026-01-18T12:00:00.000Z"
  }
}

With Access (purchased or subscriber):

json
{
  "success": true,
  "data": {
    "hasAccess": true,
    "media": [
      {
        "id": "med_1",
        "type": "image",
        "url": "https://cdn.aphrodite.example.com/media/med_1.jpg",
        "thumbnailUrl": "https://cdn.aphrodite.example.com/thumbnails/med_1.jpg",
        "width": 1920,
        "height": 1080
      }
    ]
  }
}

Update Content Item#

http
PUT /content-store/:contentId
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "title": "Updated Title",
  "description": "Updated description",
  "price": 75,
  "tags": ["exclusive", "updated"]
}

Response (200 OK): Updated content object.


Delete Content Item#

http
DELETE /content-store/:contentId
Authorization: Bearer <access_token>

Response (204 No Content)


List Creator Content#

http
GET /content-store?creatorId=usr_xyz789&type=all&visibility=all&cursor=<cursor>&limit=20
Authorization: Bearer <access_token>

Query Parameters:

Parameter Type Description
creatorId string Filter by creator
type string Filter: all, photoset, video, vod
visibility string Filter: all, public, paid, subscribers
status string Filter: all, published, draft
sort string Sort: newest, popular, trending
cursor string Pagination cursor
limit number Items per page (default: 20, max: 50)

Response (200 OK):

json
{
  "success": true,
  "data": [
    {
      "id": "cnt_abc123",
      "title": "Exclusive Photo Set",
      "type": "photoset",
      "thumbnail": { "url": "..." },
      "visibility": "paid",
      "price": 50,
      "stats": { "views": 1250, "purchases": 42 },
      "createdAt": "2026-01-18T12:00:00.000Z"
    }
  ],
  "pagination": {
    "cursor": "next_cursor",
    "hasMore": true,
    "total": 156
  }
}

Photo Sets#

Create Photo Set#

http
POST /photosets
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "title": "Beach Photoshoot 2026",
  "description": "Summer vibes at the beach",
  "visibility": "subscribers",
  "coverPhotoId": "med_1",
  "photos": [
    { "mediaId": "med_1", "order": 1, "caption": "Sunset shot" },
    { "mediaId": "med_2", "order": 2, "caption": "Beach walk" },
    { "mediaId": "med_3", "order": 3, "caption": null }
  ],
  "tags": ["beach", "summer", "photoshoot"]
}

Response (201 Created):

json
{
  "success": true,
  "data": {
    "id": "ps_abc123",
    "title": "Beach Photoshoot 2026",
    "description": "Summer vibes at the beach",
    "visibility": "subscribers",
    "photoCount": 3,
    "coverPhoto": {
      "id": "med_1",
      "url": "https://cdn.aphrodite.example.com/media/med_1.jpg",
      "thumbnailUrl": "https://cdn.aphrodite.example.com/thumbnails/med_1.jpg"
    },
    "createdAt": "2026-01-18T12:00:00.000Z"
  }
}

Get Photo Set#

http
GET /photosets/:photosetId
Authorization: Bearer <access_token>

Response (200 OK):

json
{
  "success": true,
  "data": {
    "id": "ps_abc123",
    "title": "Beach Photoshoot 2026",
    "description": "Summer vibes at the beach",
    "visibility": "subscribers",
    "hasAccess": true,
    "creator": {
      "id": "usr_xyz789",
      "username": "janedoe"
    },
    "photos": [
      {
        "id": "pht_1",
        "mediaId": "med_1",
        "order": 1,
        "caption": "Sunset shot",
        "url": "https://cdn.aphrodite.example.com/media/med_1.jpg",
        "thumbnailUrl": "https://cdn.aphrodite.example.com/thumbnails/med_1.jpg",
        "width": 1920,
        "height": 1080
      }
    ],
    "stats": {
      "views": 500,
      "likes": 89
    },
    "createdAt": "2026-01-18T12:00:00.000Z"
  }
}

Update Photo Set#

http
PUT /photosets/:photosetId
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "title": "Beach Photoshoot - Updated",
  "photos": [
    { "mediaId": "med_1", "order": 1 },
    { "mediaId": "med_4", "order": 2 },
    { "mediaId": "med_2", "order": 3 }
  ]
}

Response (200 OK): Updated photo set object.


Video on Demand (VOD)#

Create VOD#

http
POST /vod
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "title": "Behind the Scenes - January 2026",
  "description": "Exclusive behind the scenes footage",
  "mediaId": "med_video123",
  "visibility": "paid",
  "price": 200,
  "currency": "tokens",
  "previewStartTime": 0,
  "previewDuration": 30,
  "tags": ["bts", "exclusive"],
  "chapters": [
    { "title": "Introduction", "startTime": 0 },
    { "title": "Getting Ready", "startTime": 120 },
    { "title": "The Shoot", "startTime": 300 }
  ]
}

Response (201 Created):

json
{
  "success": true,
  "data": {
    "id": "vod_abc123",
    "title": "Behind the Scenes - January 2026",
    "description": "Exclusive behind the scenes footage",
    "visibility": "paid",
    "price": 200,
    "currency": "tokens",
    "duration": 1800,
    "thumbnail": {
      "url": "https://cdn.aphrodite.example.com/thumbnails/vod_abc123.jpg"
    },
    "preview": {
      "url": "https://cdn.aphrodite.example.com/previews/vod_abc123.mp4",
      "duration": 30
    },
    "chapters": [
      { "title": "Introduction", "startTime": 0 },
      { "title": "Getting Ready", "startTime": 120 },
      { "title": "The Shoot", "startTime": 300 }
    ],
    "qualities": ["1080p", "720p", "480p", "360p"],
    "status": "published",
    "createdAt": "2026-01-18T12:00:00.000Z"
  }
}

Get VOD#

http
GET /vod/:vodId
Authorization: Bearer <access_token>

Response (200 OK) - Without Access:

json
{
  "success": true,
  "data": {
    "id": "vod_abc123",
    "title": "Behind the Scenes - January 2026",
    "description": "Exclusive behind the scenes footage",
    "creator": {
      "id": "usr_xyz789",
      "username": "janedoe",
      "displayName": "Jane Doe"
    },
    "visibility": "paid",
    "price": 200,
    "currency": "tokens",
    "duration": 1800,
    "thumbnail": { "url": "..." },
    "preview": { "url": "...", "duration": 30 },
    "hasAccess": false,
    "stats": {
      "views": 2500,
      "purchases": 180,
      "likes": 420
    }
  }
}

Response (200 OK) - With Access:

json
{
  "success": true,
  "data": {
    "hasAccess": true,
    "streamUrl": "https://stream.aphrodite.example.com/vod/vod_abc123/playlist.m3u8",
    "streamToken": "vod_access_token",
    "tokenExpiresAt": "2026-01-18T14:00:00.000Z",
    "qualities": [
      { "quality": "1080p", "url": "...playlist_1080p.m3u8" },
      { "quality": "720p", "url": "...playlist_720p.m3u8" }
    ],
    "chapters": [...],
    "watchProgress": {
      "position": 450,
      "completed": false
    }
  }
}

Update Watch Progress#

http
POST /vod/:vodId/progress
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "position": 600,
  "completed": false
}

Response (200 OK):

json
{
  "success": true,
  "data": {
    "position": 600,
    "completed": false,
    "updatedAt": "2026-01-18T12:30:00.000Z"
  }
}

Content Licensing#

Get Content License#

http
GET /licenses/:contentId
Authorization: Bearer <access_token>

Response (200 OK):

json
{
  "success": true,
  "data": {
    "contentId": "cnt_abc123",
    "licenseType": "personal_use",
    "permissions": {
      "view": true,
      "download": false,
      "redistribute": false,
      "commercial_use": false
    },
    "restrictions": [
      "Content may not be shared or redistributed",
      "Screenshots are prohibited",
      "DRM protection enabled"
    ],
    "validFrom": "2026-01-18T12:00:00.000Z",
    "validUntil": null
  }
}

Data Types#

Content Object#

typescript
interface Content {
  id: string;
  title: string;
  description?: string;
  type: 'post' | 'photoset' | 'video' | 'vod' | 'audio' | 'article';
  visibility: 'public' | 'followers' | 'subscribers' | 'paid' | 'private';
  price?: number;
  currency?: 'tokens' | 'USD';
  status: 'draft' | 'processing' | 'published' | 'removed';
  creatorId: string;
  media: MediaItem[];
  thumbnail?: MediaItem;
  tags: string[];
  stats: ContentStats;
  createdAt: string;
  publishedAt?: string;
  updatedAt: string;
}

Media Item Object#

typescript
interface MediaItem {
  id: string;
  type: 'image' | 'video' | 'audio';
  url: string;
  thumbnailUrl?: string;
  width?: number;
  height?: number;
  duration?: number;
  size: number;
  mimeType: string;
}

Document History#

Date Version Changes
2026-01-18 1.0.0 Initial Content Service API docs