Skip to main content

Authentication

You will need an api-key to access the Maestro API. You can obtain this key from the Maestro dApp Platform Dashboard.

Examples

POST Request

Example request for submitting a transaction:
curl -X POST https://midl-mainnet.gomaestro-api.org/v0 \
  -H "Content-Type: application/json" \
  -H "api-key: YOUR_API_KEY" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

Security

To ensure the security of your API usage, follow these best practices:
  • Keep your API key private: Never share it publicly (e.g., on GitHub, client-side code).
  • Prevent unauthorized usage: Loss or misuse of your API key can result in the overuse of your account’s available credits.
  • Secure your API key: Implement proper methods for storing and accessing your api-key, especially in production environments.

Computer Credits

Maestro uses Compute Credits to measure the computational resources consumed by your applications on its platform, similar to traditional cloud providers like Google Cloud or AWS. The number of credits assigned to each operation or method is based on the global average duration of that process, taking into account factors like complexity and computational intensity. Learn more about how Compute Credits are allocated by exploring the Subscription breakdown. Compute Credits provide a fair, usage-based pricing model, meaning you only pay for the computational resources your application actually uses, making it both cost-efficient and flexible.

Request Limits

Maestro enforces two types of API rate limits:
  • Per day: a set amount of credits consumed per day based on your subscription plan.
  • Per second: a set amount of requests per second based on your subscription plan.
For example, the Artist plan supports up to 10 requests per second.
For more details on available packages or to upgrade your plan, refer to the Pricing page. If your organization needs higher limits, contact us to discuss Enterprise solutions.

Response Headers

Maestro includes the following headers in API responses to help manage usage:
HeaderDescription
X-RateLimit-Limit-SecondMaximum allowed requests per second.
X-RateLimit-Remaining-SecondRemaining allowed requests for the current second.
X-Maestro-Credits-LimitTotal allowed credits for the day.
X-Maestro-Credits-RemainingRemaining credits for the day.
Be sure to monitor these values (in bold) and adjust your request rate accordingly to avoid hitting rate limits.

Errors

Maestro follows standard HTTP response codes to indicate the success or failure of API requests:
2xxSuccess
4xxClient-side errors, such as missing or incorrect parameters.
5xxServer-side errors with Maestro.
Refer to the API Reference for detailed response codes for each endpoint.
I