> For the complete documentation index, see [llms.txt](https://docs.flxbl.io/flxbl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flxbl.io/flxbl/sfp-server/api-reference/platform-ai.md).

# Platform AI

## GET /sfp/api/platform-ai/status

> Platform AI status: gateway presence, model, BYO state, monthly usage per product

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"52.12.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}}},"paths":{"/sfp/api/platform-ai/status":{"get":{"operationId":"PlatformAiController_status","summary":"Platform AI status: gateway presence, model, BYO state, monthly usage per product","parameters":[],"responses":{"200":{"description":"Status retrieved"},"403":{"description":"Forbidden - Requires role: owner"}},"tags":["Platform AI"]}}}}
```

## GET /sfp/api/platform-ai/entitlements

> Per-product SKU state: enabled, included allowance, add-on capacity

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"52.12.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}}},"paths":{"/sfp/api/platform-ai/entitlements":{"get":{"operationId":"PlatformAiController_entitlements","summary":"Per-product SKU state: enabled, included allowance, add-on capacity","parameters":[],"responses":{"200":{"description":"Entitlements retrieved"},"403":{"description":"Forbidden - Requires role: owner"}},"tags":["Platform AI"]}}}}
```

## Platform-operator path: read SKU entitlements with monthly usage

> Callable only by the flxbl console via the console→tenant channel (x-monitoring-token + console IP).

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"52.12.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}}},"paths":{"/sfp/api/platform-ai/operator/entitlements":{"get":{"operationId":"PlatformAiController_operatorEntitlements","summary":"Platform-operator path: read SKU entitlements with monthly usage","description":"Callable only by the flxbl console via the console→tenant channel (x-monitoring-token + console IP).","parameters":[],"responses":{"200":{"description":"Entitlements with usage retrieved"},"401":{"description":"Invalid or missing console token"}},"tags":["Platform AI"]}}}}
```

## Platform-operator path: adjust a SKU (enable/disable, included allowance, add-on capacity)

> Callable only by the flxbl console via the console→tenant channel (x-monitoring-token + console IP). Tenant users, including Owners, cannot change entitlements.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"52.12.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}}},"paths":{"/sfp/api/platform-ai/entitlements/{product}":{"put":{"operationId":"PlatformAiController_setEntitlement","summary":"Platform-operator path: adjust a SKU (enable/disable, included allowance, add-on capacity)","description":"Callable only by the flxbl console via the console→tenant channel (x-monitoring-token + console IP). Tenant users, including Owners, cannot change entitlements.","parameters":[{"name":"product","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Entitlement updated"},"400":{"description":"Unknown product or invalid values"},"401":{"description":"Invalid or missing console token"},"403":{"description":"Source IP is not the console"}},"tags":["Platform AI"]}}}}
```

## PATCH /sfp/api/platform-ai/model

> Select the model used by the platform AI gateway (null resets to automatic)

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"52.12.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}}},"paths":{"/sfp/api/platform-ai/model":{"patch":{"operationId":"PlatformAiController_setModel","summary":"Select the model used by the platform AI gateway (null resets to automatic)","parameters":[],"responses":{"200":{"description":"Model updated"},"400":{"description":"Model not in the approved list"},"403":{"description":"Forbidden - Requires role: owner"},"404":{"description":"No platform AI gateway on this tenant"}},"tags":["Platform AI"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.flxbl.io/flxbl/sfp-server/api-reference/platform-ai.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
