Skip to content

Latest commit

 

History

History
145 lines (89 loc) · 4.73 KB

File metadata and controls

145 lines (89 loc) · 4.73 KB

📡 API Overview

Overview

The Molecule Protocol provides programmatic APIs for building applications, integrations, and automated workflows on top of decentralized science infrastructure. These APIs enable developers to query project data, tokenize research, and manage research datarooms.

API Areas

📁 Labs API

Upload files to lab datarooms for secure, decentralized research data storage, and query labs, members, activity, and legal-agreement status.

Purpose:

  • Create labs (datarooms) for onchain labs (OCLs)
  • Automate file uploads to lab datarooms
  • Integrate with data pipelines and CI/CD
  • Batch upload research data
  • Manage file versions, metadata, and LabNFT display metadata
  • Query labs, files, members, activity, and onchain events (mostly public access)
  • Manage service tokens and legal-agreement signing

Authentication:

  • Most queries (read operations): API Key only — public. One exception, legalAgreementTemplate, needs a Service Token or an authenticated session.
  • Write mutations (write operations): API Key plus either a Service Token (X-Service-Token) or a Privy user session (Authorization + x-wallet-address) — the two paths are interchangeable. Exceptions: extendServiceToken and revokeServiceToken are Service-Token-only, and generateServiceToken bootstraps a token from a Privy session or wallet signature.

View Labs API Documentation →


🔐 Tokenization API

Tokenize Labs into fungible IP Tokens (IPTs) on Base.

Purpose:

  • Tokenize Labs into tradeable ERC-20 tokens
  • Generate Lab (OCL) membership agreements
  • Manage the complete onchain tokenization workflow

Authentication: API Key required

View Tokenization API Documentation →


💳 x402 Gateway

Pay-per-call HTTP 402 gateway that fronts a set of Labs API write mutations with per-request USDC settlement on Base.

Purpose:

  • Give autonomous agents and third-party tools write access without a long-lived service token
  • Pay per mutation call in USDC, settled on Base
  • Mint short-lived, scoped service tokens on the fly after payment

Authentication: Per-request stablecoin payment (no long-lived service token required)

View x402 Gateway Documentation →


📊 IPNFT API (Deprecated)

Query and browse IP-NFTs, IP Tokens (IPTs), and market data across the Molecule ecosystem.

Purpose:

  • Browse all IP-NFTs and IPTs on the platform
  • Query metadata, ownership, and project details
  • Access trading data and market metrics
  • Build marketplace UIs and token screeners

Authentication: API Key required

View IPNFT API Documentation (Deprecated) →


Authentication

All Molecule APIs require an API key; the Labs API additionally uses a Service Token for write operations. Obtaining credentials, the per-API header requirements, and the full Labs API authentication model (public queries vs. protected mutations) are documented on the dedicated Authentication page.


API Endpoints

All APIs use the same GraphQL endpoint:

Production: https://production.graphql.api.molecule.xyz/graphql
Staging:    https://staging.graphql.api.molecule.xyz/graphql

Quick Start Guide

1. Get API Access

Contact the Molecule team via Discord to obtain your API key.

2. Choose Your API

If you want to... Use this API
Upload files to a Lab dataroom Labs API
Tokenize a Lab into IP Tokens (IPTs) Tokenization API
Pay per call without a long-lived token x402 Gateway
Browse IP-NFTs and IPTs (legacy) IPNFT API (Deprecated)
Check market prices and trading data (legacy) IPNFT API (Deprecated)

3. Make Your First Request

Example (Labs API — public labs query, API key only):

curl -X POST https://production.graphql.api.molecule.xyz/graphql \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{
    "query": "query { labs(perPage: 5) { nodes { oclId name shortname } totalCount } }"
  }'

Getting Support

If you encounter any issues or have questions about the APIs:

  • Discord: Join our Discord community for support
  • Documentation: Check the specific API documentation pages linked above
  • Contact: Reach out to the Molecule development team

Additional Resources


Last updated: July 2026