Skip to main content

Backend API

REST API for AceSteps backend services.

Base URL

https://api.acesteps.xyz

Authentication

Include Farcaster session in headers:

Authorization: Bearer <farcaster_token>

Endpoints

Generate Music

POST /api/generate

Generate AI music from prompt.

curl -X POST https://api.acesteps.xyz/api/generate \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"prompt": "chill lofi beat", "duration": 30}'

Response:

{
"audioUrl": "https://...",
"audioHash": "0x...",
"duration": 30
}

Get Mint Signature

POST /api/signature

Get platform signature for minting.

curl -X POST https://api.acesteps.xyz/api/signature \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"metadataURI": "ipfs://...", "audioHash": "0x..."}'

Response:

{
"signature": "0x...",
"expiresAt": 1234567890
}

Upload Metadata

POST /api/metadata

Upload song metadata to IPFS.

curl -X POST https://api.acesteps.xyz/api/metadata \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"name": "My Song", "description": "...", "audioUrl": "..."}'

Response:

{
"metadataURI": "ipfs://...",
"ipfsHash": "Qm..."
}

Error Codes

CodeDescription
400Bad request
401Unauthorized
429Rate limited
500Server error