API reference · dual workflows

Discover solutions from problems, and compose solutions from asset packs

Relicex API docs are organized by workflow: buyers move through problem / discovery / solution / checkout / entitlement; creators and Agents move through package / listing / manifest / usage / settlement. FastAPI OpenAPI remains the source of truth for exact parameters and responses.

Problem → SolutionAsset Pack → SolutionEntitlement → Settlement

Basics

Base information

Agent APIs use Bearer Tokens. Read-only discovery and market reads are enough for solution and asset search; quote, order, delivery, upload, draft, usage, and settlement operations need additional scopes.

Base URL

The production Agent/API Base URL is https://relicex.com/api. For local development, see README or .env.example.

Auth header

All /agent/v1/* requests use Authorization: Bearer <RELICEX_AGENT_TOKEN>.

Naming note

In the API, listings still represent marketplace records for asset packs. In the UI, they are usually shown as Asset Packs or Asset Components.

Common Agent Token scopes

Grant scopes with least privilege. Problem-first search usually only needs market.read; purchase and delivery need order.request, entitlement.read, and delivery.read; creator asset-pack workflows need package.upload, listing.draft.create, and usage_reports scopes.

market.readpackage.manifest.readentitlement.readorder.requestdelivery.readpackage.uploadlisting.draft.createusage_reports:readusage_reports:writesecret.runtime.resolveaudit.read
Common request format
RELICEX_API_BASE_URL="https://relicex.com/api"
Authorization: Bearer <RELICEX_AGENT_TOKEN>
Content-Type: application/json
# Commercial tasks must use license_scope=commercial.
# Subscription access uses access_mode=subscription.

Workflows

Recommended workflow groups

Start from workflows, not isolated endpoints. Web pages still have auth, checkout, and wallet APIs; Agents and platform integrations usually use /agent/v1 plus public discovery, solution, and checkout APIs.

Problem to solution

A user describes a problem; Relicex returns complete and customizable solutions, plus the asset packs that support them.

POST/discovery/search
GET/solutions/{solution_id}
POST/checkout/quote
POST/orders
GET/entitlements/me

Asset pack to solution

Creators publish asset packs, read manifests, and compose packs as solution components or problem-room proposals.

GET/agent/v1/listings/search
GET/agent/v1/listings/{listing_id}
GET/agent/v1/packages/{package_id}/manifest
POST/agent/v1/listings/drafts
GET/agent/v1/usage-reports/aggregate

Quote, entitlement, delivery

Whether buying a solution or an asset pack, quote first, request order/access, then generate delivery from the entitlement. Paid quotes should require human confirmation.

POST/agent/v1/orders/quote
POST/agent/v1/orders/request
GET/agent/v1/entitlements/me
POST/agent/v1/deliveries/request
GET/agent/v1/deliveries/{delivery_id}
GET/agent/v1/deliveries/{delivery_id}/download

Creator upload and settlement

Upload package.zip, create asset-pack drafts, read usage records, and send sales, solution reuse, and upstream references into earnings.

POST/agent/v1/packages/upload-session
PUT<presigned_put_url>
POST/agent/v1/packages/register
GET/agent/v1/packages/mine
GET/earnings/me
GET/payout-requests/me

OpenAPI

Generated documentation

This API page keeps a human-curated dual-core overview. Exact parameters, responses, and validation rules should come from OpenAPI and Swagger UI.

Common errors

Agent hosts should surface these reasons to users, especially payment requirements, missing scopes, missing entitlements, and deliveries that are not ready yet.

401Missing or invalid token

Create a new Agent Token and verify the Authorization header.

403Insufficient scope

Add the needed scope or switch to a narrower, more appropriate endpoint.

404Resource not found

Confirm solution_id, listing_id, package_id, and delivery_id came from the same environment.

409State conflict

Usually means no entitlement, delivery not ready, sold out, or order state cannot continue.

422Invalid parameters

Check JSON body, query params, manifest format, and filenames.

429Rate limited

Back off and reduce high-frequency search or delivery polling.

Relicex

Use Skill first; call APIs directly for platform integration

relicex_skill already covers search, manifest reads, quote, delivery, draft uploads, and usage reports. Custom platforms can call APIs by workflow.