> For the complete documentation index, see [llms.txt](https://docs.api.market/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.api.market/seller-docs/what-is-a-pricing-plan.md).

# What is a Pricing Plan

Every product on api.market needs at least one pricing plan. A plan decides what customers pay, how much they can use, and which endpoints they can call.

### 📏 Billing units

Each plan has a **billing unit**: what one unit means. The plan's price and its included allowance are both counted in that unit.

| Billing unit         | What one unit means                                                             | Example                                |
| -------------------- | ------------------------------------------------------------------------------- | -------------------------------------- |
| Default              | Keeps the way the product is billed today. New products bill one unit per call. | 1 call = 1 unit                        |
| Per call             | One successful call, whatever it returns                                        | 1 call = 1 unit                        |
| Per image            | Each image in the response, as a file URL or a base64 image                     | A call returning 4 images = 4 units    |
| Per second of video  | Each second of the output video, rounded up                                     | A 30 second clip = 30 units            |
| Per megapixel        | Each megapixel of the output image, rounded up                                  | One 1920x1080 image (2.1 MP) = 3 units |
| Per 1,000 characters | Each 1,000 characters of input text, rounded up                                 | A 2,500 character prompt = 3 units     |

api.market counts these units for you. Images, seconds and megapixels are counted from the files your API returns to a POST call. Characters are counted from the request text before the call is made.

💡 **Billing by something else, such as tokens?** Your API can report the exact units for each call in a response header. See [Custom Usage](https://docs.api.market/seller-docs/custom-usage). The header always wins over the plan's unit.

### 💰 The three plan types

#### 1. Free trial

* $0, for 7 days, up to a number of units.
* Each customer can take the free trial of a product only once.
* Calls stop when the units run out.
* **Private free plan:** set Access to Private to make a free plan for testers you invite. A private free plan renews every month for the people you invite.

✅ **Best for:** letting developers try your API without a credit card.

#### 2. Monthly subscription

* A monthly price with included units, for example $9 a month for 500 images.
* When the included units run out, you choose what happens:
  * **Stop the calls:** nothing extra is charged; calls are refused until next month.
  * **Charge for the extra:** each extra unit is billed at the end of the month at the price you set.
* The monthly price can be $0 when you charge for the extra.

✅ **Best for:** customers who want a predictable monthly cost.

#### 3. Pay as you go

* No monthly fee. Customers pay a price per unit from their wallet as they use it.
* Always public, and always shown as **PAYG** on the store.
* Customers need at least $1 in their wallet to subscribe.

✅ **Best for:** customers with irregular usage who only want to pay for what they use.

### 📍 Where to add plans

1. Open your product under **Manage APIs → API Products**.
2. Open the **Manage Pricing Plans** tab.
3. Click **Add Pricing Plans**.

<figure><img src="https://979396929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpzXHBiEL3zWqYljGVxS%2Fuploads%2FtLrCLQMAmIvKAS2rTfO1%2Fpricing-plans-tab.jpg?alt=media&amp;token=f1dc4009-4d98-4b85-98df-24678a0f03d7" alt=""><figcaption></figcaption></figure>

Adding a plan opens a short wizard with six steps. You can go back to any step before you save.

### 1️⃣ Basics

| Field               | What to enter                                                            |
| ------------------- | ------------------------------------------------------------------------ |
| Plan name           | Shown on the store card, such as Free, Pro or Mega. Up to 20 characters. |
| API source          | The API source you imported                                              |
| Your API's base URL | Where api.market forwards each call. Filled in from the API source.      |

The **Endpoint customers call** box shows the URL your customers will use.

<figure><img src="https://979396929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpzXHBiEL3zWqYljGVxS%2Fuploads%2FNwqSl14BDbaddAcv55lK%2Fwizard-1-basics.jpg?alt=media&amp;token=967c4da1-7837-43c8-8075-e3046ebaeee0" alt=""><figcaption></figcaption></figure>

Open **Advanced: custom headers and rate limit** if you need them:

| Field          | What it does                                                                                                                                                                                                                             |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Custom headers | A JSON object of headers added to every call forwarded to your API, for example `{"x-api-key": "YOUR_SECRET_KEY"}`. Header names can use letters, digits and symbols such as - and \_, but no spaces. Values cannot contain line breaks. |
| Rate limit     | Maximum requests per second for each subscriber, a whole number from 1 to 1,000. Leave it empty for 10.                                                                                                                                  |

<figure><img src="https://979396929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpzXHBiEL3zWqYljGVxS%2Fuploads%2F6sacUeWAh6UqXSwRvaeT%2Fwizard-1-advanced.jpg?alt=media&amp;token=aca0262c-d180-4f1a-94fc-6a19005e910c" alt=""><figcaption></figcaption></figure>

### 2️⃣ Plan type

Choose **Free trial**, **Monthly subscription** or **Pay as you go**. See the plan types above.

<figure><img src="https://979396929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpzXHBiEL3zWqYljGVxS%2Fuploads%2FaW8p3HsTejT4l1eAvpgq%2Fwizard-2-plan-type.jpg?alt=media&amp;token=c8369b93-c7aa-429d-9637-430b6dd7c0f4" alt=""><figcaption></figcaption></figure>

### 3️⃣ Price and unit

First pick the **billing unit**. Each option shows an example of what a call costs.

<figure><img src="https://979396929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpzXHBiEL3zWqYljGVxS%2Fuploads%2FrCWDrx3mzh0pokOsRqhQ%2Fwizard-3-billing-unit.jpg?alt=media&amp;token=2023ac51-6dc4-4bca-8d2d-119f9e05fe26" alt=""><figcaption></figcaption></figure>

Then fill in the fields for your plan type:

| Plan type            | Fields                                                                                                                            |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| Free trial           | Units in the trial                                                                                                                |
| Monthly subscription | Monthly price, included units per month, what happens when they run out, and the price per extra unit if you charge for the extra |
| Pay as you go        | Price per unit                                                                                                                    |

<figure><img src="https://979396929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpzXHBiEL3zWqYljGVxS%2Fuploads%2FhJrXL8bsZEd25sRUqRJa%2Fwizard-3-monthly-price.jpg?alt=media&amp;token=ed33f905-4be8-48ed-8cfc-3ea1e0342f7b" alt=""><figcaption></figcaption></figure>

💡 **Tip:** prices per unit can be very small, up to 6 decimal places (for example $0.00001).

⚠️ **Note:** images, seconds and megapixels are counted after each call returns. A call that starts before the allowance runs out can go past it by what that call returns.

### 4️⃣ Endpoints

Choose which endpoints customers on this plan can call. Use **Select all** or pick individual endpoints.

<figure><img src="https://979396929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpzXHBiEL3zWqYljGVxS%2Fuploads%2F1e1FxefVdaPc8HBS8D2F%2Fwizard-4-endpoints.jpg?alt=media&amp;token=bd1bf074-7390-4c58-90aa-63632bd5408c" alt=""><figcaption></figcaption></figure>

💡 **Tip:** different plans can include different endpoints. For example, a free trial with one endpoint and a paid plan with all of them.

### 5️⃣ Access

| Option  | Behavior                                                    |
| ------- | ----------------------------------------------------------- |
| Public  | Listed on the store; anyone can subscribe                   |
| Private | Hidden from the store; only people you invite can subscribe |

Pay as you go plans are always public. A private free plan renews every month for the people you invite.

<figure><img src="https://979396929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpzXHBiEL3zWqYljGVxS%2Fuploads%2FRQ6kFra66FC2PfbhBNBV%2Fwizard-5-private-free-plan.jpg?alt=media&amp;token=b9b7ad01-ec53-45be-b425-6156848a0044" alt=""><figcaption></figcaption></figure>

### 6️⃣ Review

The Review step describes your plan in one plain sentence, for example "$9 a month for 500 images. Extra usage costs $0.02 per image.", followed by a summary of every setting. Click **Create plan** to save it.

<figure><img src="https://979396929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpzXHBiEL3zWqYljGVxS%2Fuploads%2FZbzFMGxiYrYA7jZU935Q%2Fwizard-6-review-monthly.jpg?alt=media&amp;token=c2930bd1-b574-4fad-945c-3a980b386767" alt=""><figcaption></figcaption></figure>

Your plan now appears on the **Manage Pricing Plans** tab, and the publishing checklist moves forward.

### ✏️ Editing a plan

Click **Edit Pricing Plan** on a plan card to open the same wizard with the plan's current settings. The copy icon next to it duplicates the plan.

Customers who already subscribed keep being billed in the unit of the plan version they signed up for.

💡 **Tip:** start with a free trial so developers can try your API, then add paid plans for heavier usage.

Next → [Submitting for Review](https://docs.api.market/seller-docs/submitting-for-review)
