---
title: "Set Ai"
method: PUT
path: "/api/apps/{name}/ai"
tags: ["deploy"]
---

# Set Ai

`PUT /api/apps/{name}/ai`

## Request

- Base URL: `https://softkiln.com` (the document declares no server; this is the origin it was published from)
- URL: `https://softkiln.com/api/apps/{name}/ai`
- Auth: none declared

Toggle managed AI, and set this app's spend cap.

## Path parameters

- `name` string, required

## Request body

- SetAiRequest
  - `enabled` boolean, nullable
  - `period_cap_microcents` integer, nullable

## Response `200`

Successful Response

- AiStatusOut
  - `enabled` boolean, required
  - `configured` boolean, required
  - `available_models` string[], required
  - `max_completion_tokens_cap` integer, nullable, required
  - `period_cap_microcents` integer, nullable, required
  - `org_available_microcents` integer, required
  - `agent_offered` boolean, required
  - `max_concurrent_runs` integer, nullable, required
  - `default_concurrent_runs` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/softkiln/apis/app-manager-api.md) · [All operations](https://skmtc.dev/softkiln/apis/app-manager-api/llms.txt) · [OpenAPI document](https://skmtc.dev/softkiln/apis/app-manager-api/revisions/de2b674a7f21?raw)
