# Custom Usage

[api.market](https://api.market/) allows you to set custom Usage reported by your backend. These changes need to be made in your API backend. Hence when [api.market](https://api.market/) calls your API backend, then that backend must add this header to the response.

Please make sure you mention this clearly in your Product description on [api.market](https://api.market/). You must also include this in your docs.

### Default Behavior:

By default, each request consumes "1" API call for the given Pricing Plan. Hence the default header is added to all requests:

```
X-Magicapi-Billing: API=1;
```

### Allow "unlimited" calls for certain endpoints <a href="#allow-unlimited-calls-for-certain-endpoints" id="allow-unlimited-calls-for-certain-endpoints"></a>

If you wish to make certain endpoints "FREE". i.e. To NOT reduce the API usage when a user requests those endpointPaths. Then you can simply pass this header:

```
X-Magicapi-Billing: API=0;
```

This will not "increase" the total API calls used in the given plan.

### Charge more than "1" API unit for a request <a href="#charge-more-than-1-api-unit-for-a-request" id="charge-more-than-1-api-unit-for-a-request"></a>

Similarly to charge more than "one" unit per request, you can update this header to the custom usage and send it as a response in your API.

```
X-Magicapi-Billing: API=3;
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.api.market/seller-docs/custom-usage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
