Skip to content

Credits & Usage

To keep track of your resource consumption, Merchrocket provides real-time information about your included and used credits directly within the API responses.

Credit Headers

For specific endpoints, Merchrocket includes custom HTTP headers in the response. This allows you to monitor your usage without making additional API calls to statistics endpoints.

HeaderDescription
The total number of credits included in your current monthly plan.
The number of credits already consumed in the current calendar month.

How it works

The X-MR-Credits-Used value is calculated per calendar month. It is updated in real-time as you perform credit-relevant actions (e.g., generating mockups).

Credit Calculation

In Merchrocket, 1 credit corresponds to a specific consumption of resources.

Currently, the following calculation applies:

ItemConsumption
Generated Mockup Image1 Credit per Image

This calculation allows you to easily estimate your costs and resource consumption.

Supported Endpoints

The credit headers are currently available for Mockup Task related operations:

  • GET /api/mockup-tasks (List all mockup tasks)
  • GET /api/mockup-tasks/{id} (Retrieve a specific mockup task)

Example Response

When you call one of the supported endpoints, you will find the credit information in the response headers:

http
HTTP/1.1 200 OK
Content-Type: application/ld+json
X-MR-Credits-Included: 1000
X-MR-Credits-Used: 145

{
  "@context": "/api/contexts/MockupTask",
  "@id": "/api/mockup-tasks/01903584-7c78-7592-b0bc-6df076e02957",
  ...
}

For more detailed historical data, you can also check the Mockup Statistics page.