# Factory Pay Per Use

Source: https://opvs.ai/docs/api/factory-pay-per-use

## `GET` /api/v1/factory/pay-per-use

**Get Pay Per Use**

```bash
curl -X GET 'https://app.opvs.ai/api/v1/factory/pay-per-use' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

resp = httpx.get(
    "https://app.opvs.ai/api/v1/factory/pay-per-use",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/factory/pay-per-use", {
  method: "GET",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://app.opvs.ai/api/v1/factory/pay-per-use", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response

## `PUT` /api/v1/factory/pay-per-use

**Put Pay Per Use**

**Request body**

```bash
curl -X PUT 'https://app.opvs.ai/api/v1/factory/pay-per-use' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "enabled": true,
  "monthly_cap_usd": 0.0,
  "acknowledged": false
}'
```

```python
import httpx

resp = httpx.put(
    "https://app.opvs.ai/api/v1/factory/pay-per-use",
    headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
    json={"enabled": true, "monthly_cap_usd": 0.0, "acknowledged": false},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/factory/pay-per-use", {
  method: "PUT",
  headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
  body: JSON.stringify({"enabled": true, "monthly_cap_usd": 0.0, "acknowledged": false})
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{"enabled": true, "monthly_cap_usd": 0.0, "acknowledged": false}`)
	req, _ := http.NewRequest("PUT", "https://app.opvs.ai/api/v1/factory/pay-per-use", body)
	req.Header.Set("Authorization", "Bearer <token>")
	req.Header.Set("Content-Type", "application/json")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

## Get Pay Per Use

`GET https://app.opvs.ai/api/v1/factory/pay-per-use`

Also as: MCP `tool_call software-factory.getPayPerUse` · skill `software-factory`

## Put Pay Per Use

`PUT https://app.opvs.ai/api/v1/factory/pay-per-use`

Also as: MCP `tool_call software-factory.setPayPerUse` · skill `software-factory`

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |
