ListenHubOpenAPI

Authentication & Security

Base URL, API key usage, and request limits.

Base URL

All API requests are sent to:

https://api.marswave.ai/openapi

For sandbox/test environment access, contact support@marswave.ai.

API Key

Get an API Key

  1. Go to API Key settings
  2. Click Create API Key
  3. Copy and save the key

Usage

Include the API key in the Authorization header of every request:

curl -X GET "https://api.marswave.ai/openapi/v1/speakers/list" \
  -H "Authorization: Bearer $LISTENHUB_API_KEY"
const response = await fetch('https://api.marswave.ai/openapi/v1/speakers/list', {
  headers: {
    'Authorization': `Bearer ${process.env.LISTENHUB_API_KEY}`,
  },
});
import os
import requests

response = requests.get(
    'https://api.marswave.ai/openapi/v1/speakers/list',
    headers={'Authorization': f'Bearer {os.environ["LISTENHUB_API_KEY"]}'}
)

Set Up Environment Variable

Store your API key as LISTENHUB_API_KEY. All code examples in this documentation use this variable name:

# Add to ~/.zshrc or ~/.bashrc
export LISTENHUB_API_KEY="your_api_key_here"

Or create a .env file in your project root (requires a library like dotenv to load):

# .env
LISTENHUB_API_KEY=your_api_key_here

Security Best Practices

Your API key is equivalent to account credentials. A leaked key can result in unauthorized credit consumption.

  • Always use HTTPS
  • Keep API key out of client-side code
  • Never commit API key or .env files to Git repositories
  • Store API key in environment variables

Rate Limits

LimitValueDescription
Creation request rate3 RPMUp to 3 creation requests per minute
Exceeded limit error29998Implement a backoff retry strategy

Read-only requests (such as querying episode status or listing speakers) are not subject to this limit.

Next Steps

On this page