---
title: "Start a learning run"
method: POST
path: "/api/v1/steep/learning/start"
tags: ["authed"]
---

# Start a learning run

`POST /api/v1/steep/learning/start`

## Request

- Base URL: `https://api.teaflask.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.teaflask.com/api/v1/steep/learning/start`
- Auth: none declared

Ask for a learning run now, outside the schedule. Accepted means the
request was taken, not that a run has finished or found anything; it is
refused while learning is off or a run is in progress.

## Response `202`

Successful Response

- LearningSettingsResponse: Learning's settings and where its schedule stands.
  - `available` boolean, required: Whether learning can be turned on for this workspace yet.
  - `enabled` boolean, required: Whether learning runs on its schedule.
  - `cadence` 'daily' | 'weekly' | 'monthly', required
  - `timezone` string, nullable, required: The IANA time zone runs are timed in, like Europe/Berlin. Null until learning is first turned on.
  - `monthly_spend_cap_microusd` integer, nullable, required: The most learning may spend in a calendar month (UTC), counting every learning run's cost whether your balance or your own model key pays. Null means no cap; always null for callers who can't change learning settings, since only owners see spending. In microusd: millionths of a US dollar (1,000,000 = $1.00).
  - `next_run_at` string, date-time, nullable, required: When the next scheduled run starts, give or take an hour. Null while learning is off or can't run yet.
  - `schedule_in_sync` boolean, required: False while a saved change is still reaching the scheduler.
  - `first_run_pending` boolean, required: Whether the run promised when learning was turned on is still waiting to start.
  - `turned_on_at` string, date-time, nullable, required: When learning was last turned on; null until then.
  - `updated_at` string, date-time, nullable, required: When the settings last changed; null until learning is first turned on.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `405`: Method not allowed
- `409`: Learning is off, or a learning run is in progress.
- `422`: Validation error
- `500`: Internal server error
- `503`: The scheduler is unreachable.

---

[API](https://skmtc.dev/teaflask/apis/teaflask-api.md) - [All operations](https://skmtc.dev/teaflask/apis/teaflask-api/llms.txt) - [OpenAPI document](https://skmtc.dev/teaflask/apis/teaflask-api/revisions/d23e9286b847?raw)
