Authentication
You will need anapi-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: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 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:Header | Description |
---|---|
X-RateLimit-Limit-Second | Maximum allowed requests per second. |
X-RateLimit-Remaining-Second | Remaining allowed requests for the current second. |
X-Maestro-Credits-Limit | Total allowed credits for the day. |
X-Maestro-Credits-Remaining | Remaining 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:2xx | Success |
---|---|
4xx | Client-side errors, such as missing or incorrect parameters. |
5xx | Server-side errors with Maestro. |