> ## Documentation Index
> Fetch the complete documentation index at: https://developer.pixelbyte.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Pricing & Costs

> Understand micro-cent pricing, dynamic cost factors, and how to estimate job costs

# Pricing & Costs

PixelByte uses a **micro-cent** system for precise billing. No subscriptions, no minimums — you pay only for what you use.

## Micro-Cents System

All monetary values in the API are expressed in **micro-cents**, where:

$$
1{,}000{,}000 \text{ micro-cents} = \$1.00 \text{ USD}
$$

| Micro-cents | USD        |
| ----------- | ---------- |
| 1,000,000   | \$1.00     |
| 100,000     | \$0.10     |
| 10,000      | \$0.01     |
| 1,000       | \$0.001    |
| 1           | \$0.000001 |

<Note>
  Micro-cent precision eliminates rounding errors and allows for extremely granular pricing across different model types.
</Note>

## How Pricing Works

Each model version has a **base cost** in micro-cents. The final price is calculated by applying **multiplicative factors** based on the parameters you choose.

### Multiplicative Factors

Factors are **multiplied together**, not added. This means each factor scales the cost proportionally.

```
finalCost = baseCost × factor1 × factor2 × factor3 × ...
```

<Warning>
  Factors are multiplicative, not additive. Choosing two 2x options results in a 4x total multiplier, not 2x + 2x.
</Warning>

### Example Calculation

For an image generation model with:

* **Base cost**: 40,000 micro-cents
* **Quality**: HD (1.5x multiplier)
* **Resolution**: 2048×2048 (2x multiplier)

```
finalCost = 40,000 × 1.5 × 2.0
         = 120,000 micro-cents
         = $0.12 USD
```

## Common Pricing Factors

### Quality

| Quality    | Multiplier | Description     |
| ---------- | ---------- | --------------- |
| `standard` | 1.0x       | Default quality |
| `hd`       | 1.5x       | High definition |
| `ultra`    | 2.0x+      | Maximum quality |

### Resolution (Image Models)

| Resolution | Multiplier | Typical Use          |
| ---------- | ---------- | -------------------- |
| 512×512    | 1.0x       | Thumbnails, previews |
| 1024×1024  | 1.5x       | Standard output      |
| 1536×1536  | 1.75x      | High-res output      |
| 2048×2048  | 2.0x       | Maximum resolution   |

### Duration (Video Models)

| Duration   | Multiplier |                |
| ---------- | ---------- | -------------- |
| 3 seconds  | 3x         | Short clips    |
| 5 seconds  | 5x         | Standard       |
| 10 seconds | 10x        | Extended       |
| 15 seconds | 15x        | Long form      |
| 30 seconds | 30x        | Maximum length |

### Steps (Image Generation)

| Steps | Multiplier | Quality Impact      |
| ----- | ---------- | ------------------- |
| 20    | 1.0x       | Fast, lower quality |
| 30    | 1.25x      | Balanced            |
| 50    | 1.5x       | High quality        |
| 100   | 2.0x       | Maximum quality     |

<Note>
  Exact multipliers vary by model. Check the model's documentation or use the estimate endpoint for precise costs.
</Note>

## Estimate Costs Before Submitting

Use the estimate endpoint to calculate the exact cost before committing to a job:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.muvi.video/v1/jobs/estimate \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "modelSlug": "stability/sdxl",
      "modelVersion": "v1",
      "input": {
        "prompt": "A beautiful sunset over mountains",
        "quality": "hd",
        "resolution": "2048x2048"
      }
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://api.muvi.video/v1/jobs/estimate", {
    method: "POST",
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      modelSlug: "stability/sdxl",
      modelVersion: "v1",
      input: {
        prompt: "A beautiful sunset over mountains",
        quality: "hd",
        resolution: "2048x2048"
      }
    })
  });

  const result = await response.json();
  console.log(`Cost: ${result.data.estimatedCost} micro-cents`);
  console.log(`Cost: $${(result.data.estimatedCost / 1_000_000).toFixed(4)} USD`);
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.muvi.video/v1/jobs/estimate",
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json"
      },
      json={
          "modelSlug": "stability/sdxl",
          "modelVersion": "v1",
          "input": {
              "prompt": "A beautiful sunset over mountains",
              "quality": "hd",
              "resolution": "2048x2048"
          }
      }
  )

  result = response.json()
  cost = result["data"]["estimatedCost"]
  print(f"Cost: {cost} micro-cents (${cost / 1_000_000:.4f} USD)")
  ```
</CodeGroup>

### Estimate Response

```json theme={null}
{
  "success": true,
  "data": {
    "estimatedCost": 120000,
    "baseCost": 40000,
    "factors": {
      "quality": { "value": "hd", "multiplier": 1.5 },
      "resolution": { "value": "2048x2048", "multiplier": 2.0 }
    },
    "currency": "micro-cents"
  },
  "requestId": "req_est_abc123"
}
```

## User Pricing Overrides

Platform administrators can configure custom pricing for specific users or groups:

| Override Type         | Description                           | Example                                          |
| --------------------- | ------------------------------------- | ------------------------------------------------ |
| `percentage_discount` | Percentage off the calculated price   | 20% discount → 120,000 becomes 96,000            |
| `fixed_price`         | Fixed price per job, ignoring factors | Always 50,000 micro-cents per job                |
| `custom_dynamic`      | Custom multiplier table per user      | Different factor values for HD, resolution, etc. |

<Note>
  Pricing overrides are applied server-side after the standard calculation. The estimate endpoint reflects any active overrides for the authenticated user.
</Note>
