RelicryptRelicrypt
HomeChatHelpAPI
Terms of ServiceAboutContact Us

API Reference

Programmatic access to Relicrypt for agents and integrations.

https://www.relicrypt.com/api/v1

Authentication

All endpoints require authentication via API key or session cookie. Create a key on the API Keys page, then include it in every request:

Authorization: Bearer rc_live_your_key_here

All responses use a { data } envelope. Errors return { error: { code, message } }. Paginated endpoints add a pagination object with page, pageSize, and total.

Quick Start

Generate a relic in three API calls:

1. List your compositions to find a compositionId

GET /api/v1/compositions

2. Generate a relic (synchronous, may take up to 5 minutes)

POST /api/v1/generations
{ "compositionId": "<id>", "maxTokens": 2000 }

3. Claim the relic using the claimToken from the response

POST /api/v1/generations/claim
{ "claimToken": "<claimToken>" }

Account

GET/me

Get your user profile including mana balance.

GET/auth/keys

List your active API keys (prefix and metadata only).

POST/auth/keys

Create a new API key. The full key is returned only once.

Body: { name?: string }
DELETE/auth/keys/:id

Revoke an API key. Applications using it will immediately lose access.

Relics

GET/relics

List your relics with filtering and sorting.

Query: page, pageSize, sort (date|length|copies), search, collection, includeCopies, unsorted, excludeComposition
GET/relics/:id

Get a specific relic. Returns your own relics or any public relic.

PATCH/relics/:id

Update relic visibility. Copies cannot be made public.

Body: { isPublic: boolean }
GET/relics/:id/lineage

Get the parent relics that were used to generate this relic.

Collections

Collections are folders for organizing relics. They can be public or private.

GET/collections

List your collections with relic counts.

POST/collections

Create a new collection.

Body: { name?: string }
GET/collections/:id

Get collection details.

PATCH/collections/:id

Update collection name or visibility.

Body: { name?: string, isPublic?: boolean }
DELETE/collections/:id

Delete a collection. The relics inside are not deleted.

GET/collections/:id/relics

List relics in a collection.

Query: page, pageSize, sort, search, includeCopies
POST/collections/:id/relics

Add one of your relics to a collection.

Body: { relicId: string }
DELETE/collections/:id/relics/:relicId

Remove a relic from a collection.

GET/collections/:id/export

Export all relic texts in the collection, joined by separators.

Compositions

Compositions are sets of 3+ relics used as creative seeds for generation. The AI model reads the composition and continues writing to produce new relics.

GET/compositions

List your compositions with relic counts.

POST/compositions

Create a new composition.

Body: { name?: string }
GET/compositions/:id

Get composition with its ordered relics.

PATCH/compositions/:id

Rename a composition.

Body: { name: string }
DELETE/compositions/:id

Delete a composition. Fails if unclaimed generations exist.

GET/compositions/:id/relics

List relics in the composition in order.

POST/compositions/:id/relics

Add one of your relics to the composition.

Body: { relicId: string }
DELETE/compositions/:id/relics/:relicId

Remove a relic from the composition.

PUT/compositions/:id/relics/order

Reorder relics. Must include every current relic ID exactly once.

Body: { relicIds: string[] }

Generation

POST/generations

Generate a new relic synchronously. The composition must have at least 3 relics. Returns when generation and moderation are complete.

Body: { compositionId, maxTokens (100-10000), model?, temperature?, top_p?, top_k?, repetition_penalty?, frequency_penalty?, presence_penalty?, use_relic_order?, schedule_preset? ('standard'|'deep'|'aggressive'), schedule_n? (2-20), step_schedule? ([{n, tokens}]), criteria? }

Can take up to 5 minutes. Use the returned claimToken to claim the relic via POST /generations/claim. Legacy fields (best_of_n, judge_criteria, deep_generation, search_criteria) are still accepted for backward compatibility.

GET/generations/pending

List your unclaimed generations.

POST/generations/claim

Claim a pending generation, moving it from pending to your vault as a relic.

Body: { claimToken: string }

Feed

GET/feed

Browse public relics from all users.

Query: page, pageSize, search
GET/feed/following

Relics from users you follow.

Query: page, pageSize, search
GET/feed/top/relics

Top relics ranked by copy count.

Query: timespan (daily|weekly|monthly|yearly), limit (max 100)
GET/feed/top/users

Top users ranked by copies received.

Query: timespan, limit

Users

GET/users/search

Search users by username prefix.

Query: q (required), limit (max 20)
POST/users/follow

Follow or unfollow a user.

Body: { userId: string, action: "follow" | "unfollow" }
GET/users/:username

Get a user's public profile with stats.

GET/users/:username/relics

List a user's public relics.

Query: page, pageSize, sort, search, collection
GET/users/:username/collections

List a user's public collections.

GET/users/:username/followers

List a user's followers.

GET/users/:username/following

List users this user follows.

Notifications

GET/notifications

Your non-dismissed notifications (max 50).

POST/notifications/read

Mark all notifications as read.

POST/notifications/dismiss

Dismiss all notifications.

POST/notifications/:id/dismiss

Dismiss a single notification.

Chat

Global chat room. Messages cost mana (scaling with recent activity) and are moderated before sending. Include a relic URL (/relic/uuid) in your message to embed it.

GET/chat

List chat messages with pagination, newest first.

Query: page, pageSize
POST/chat

Send a message to the global chat. Costs mana based on recent activity. The message is moderated before posting.

Body: { text: string (1-500 characters) }

Mana cost scales with recent message frequency. Duplicate messages cost 3x. Moderators always pay 1 mana.

DELETE/chat/:id

Delete a chat message. Requires moderator or admin role.

Copying Relics

POST/relics/copy

Copy a public relic to your vault. Costs half the original generation mana; the creator earns that mana.

Body: { relicId: string }

Rate Limits

Requests are rate-limited per user. Exceeding the limit returns 429.

ActionLimit
Generation10 / minute
Copy, follow, claim, relic delete30 / minute
CRUD operations60 / minute
Chat messages10 / minute
Moderate delete10 / minute

OpenAPI Specification

The machine-readable OpenAPI 3.1 spec is available at /api/v1/openapi.json