Enterprise API Documentation

Integrate Glashaus IPFS pinning into your applications.

RESTful API with OAuth2, scoped permissions, audit logging, and rate limiting for enterprises.

Quick Start

1

Get an API Key

Generate an API key from your account settings.

Authorization: Bearer sk_your_api_key_here
2

Make Your First Request

Use the IPFS CLI or upload via HTTP with your API key.

# Set your Glashaus API URL (from NEXT_PUBLIC_URL environment variable)
export API_URL="https://glashaus.xyz"
export API_KEY="sk_YOUR_API_KEY"

# Configure IPFS to use Glashaus
ipfs config Addresses.API "$API_URL"

# Add a file with authentication
ipfs --api-auth basic:$API_KEY: add myfile.txt
3

Get Your CID

Receive a content identifier to share and retrieve your file.

{
  "cid": "QmXxxx...",
  "size": 1024,
  "created": "2025-02-04T10:30:00Z"
}

API Endpoints

API Key Management

GET/api/keys

List your API keys (requires session)


POST/api/keys

Create a new API key (requires session)


DELETE/api/keys/[id]

Revoke an API key (requires session)

Web Management

GET/api/quota/status

Check storage quota and usage


GET/api/gateway/ipfs/[cid]

Download or view IPFS content


POST/api/upload-direct

Upload files (TUS resumable protocol)

IPFS CLI Proxy

Use standard IPFS CLI commands directly with Glashaus. All operations are authenticated and quota-enforced.

CLI/api/v0/add

Upload files with automatic pinning

CLI/api/v0/pin/add

Pin content by CID

CLI/api/v0/pin/rm

Unpin content

CLI/api/v0/pin/ls

List your pins


Authentication

Use Basic Auth with your API key (set NEXT_PUBLIC_URL from .env):

# Configure with your environment
export API_URL="https://glashaus.xyz"
export API_KEY="sk_your_api_key"

# Configure IPFS
ipfs config Addresses.API "$API_URL"

# Use standard IPFS commands with authentication
ipfs --api-auth basic:$API_KEY: add myfile.txt
ipfs --api-auth basic:$API_KEY: pin add bafybeig5...
ipfs --api-auth basic:$API_KEY: pin ls

Need Help?

Can't find what you're looking for? Our support team is here to help.