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

# Health checks

## Get Health Check Status

> The settings, the run in progress, and the latest finished run by provider and by offering.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"HealthCheckStatus":{"description":"The Health page: settings, the run in progress, and the latest finished run by provider.","properties":{"last_run":{"anyOf":[{"$ref":"#/components/schemas/HealthCheckRunPublic"},{"type":"null"}]},"providers":{"items":{"$ref":"#/components/schemas/ProviderHealthSummary"},"title":"Providers","type":"array"},"results":{"items":{"$ref":"#/components/schemas/HealthCheckResultPublic"},"title":"Results","type":"array"},"running":{"anyOf":[{"$ref":"#/components/schemas/HealthCheckRunPublic"},{"type":"null"}]},"settings":{"$ref":"#/components/schemas/HealthCheckSettingsPublic"}},"required":["settings","running","last_run","providers","results"],"title":"HealthCheckStatus","type":"object"},"HealthCheckRunPublic":{"description":"One pass over every offering.","properties":{"failed":{"title":"Failed","type":"integer"},"finished_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Finished At"},"id":{"title":"Id","type":"string"},"included_reasoning":{"title":"Included Reasoning","type":"boolean"},"passed":{"title":"Passed","type":"integer"},"started_at":{"format":"date-time","title":"Started At","type":"string"},"total":{"title":"Total","type":"integer"}},"required":["id","started_at","finished_at","included_reasoning","total","passed","failed"],"title":"HealthCheckRunPublic","type":"object"},"ProviderHealthSummary":{"description":"One provider's offerings in the latest finished run.\n\n``down`` when none answered, ``degraded`` when some did not, ``ok`` when all did.","properties":{"answered":{"title":"Answered","type":"integer"},"history":{"description":"Every finished run in the last 24 hours, oldest first.","items":{"$ref":"#/components/schemas/ProviderHistoryPoint"},"title":"History","type":"array"},"provider":{"title":"Provider","type":"string"},"status":{"enum":["ok","degraded","down"],"title":"Status","type":"string"},"top_error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The most common failure, with the model id taken out.","title":"Top Error"},"top_error_count":{"title":"Top Error Count","type":"integer"},"total":{"title":"Total","type":"integer"}},"required":["provider","status","answered","total","top_error","top_error_count","history"],"title":"ProviderHealthSummary","type":"object"},"ProviderHistoryPoint":{"description":"How one provider did in one run.","properties":{"answered":{"title":"Answered","type":"integer"},"started_at":{"format":"date-time","title":"Started At","type":"string"},"total":{"title":"Total","type":"integer"}},"required":["started_at","answered","total"],"title":"ProviderHistoryPoint","type":"object"},"HealthCheckResultPublic":{"description":"What one offering answered in the latest finished run.","properties":{"checked_at":{"format":"date-time","title":"Checked At","type":"string"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"failed_runs":{"default":0,"description":"How many runs in a row it has failed.","title":"Failed Runs","type":"integer"},"failing_since":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"When a failing model's unbroken run of failures began, as far back as results are kept (48 hours). Null when it answered.","title":"Failing Since"},"latency_ms":{"title":"Latency Ms","type":"integer"},"provider":{"title":"Provider","type":"string"},"selector":{"title":"Selector","type":"string"},"status":{"enum":["pass","fail","skip"],"title":"Status","type":"string"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"}},"required":["selector","provider","status","status_code","error","latency_ms","checked_at"],"title":"HealthCheckResultPublic","type":"object"},"HealthCheckSettingsPublic":{"description":"Whether the checks run, how often, and what they send.","properties":{"alert_emails":{"items":{"type":"string"},"title":"Alert Emails","type":"array"},"interval_minutes":{"title":"Interval Minutes","type":"integer"},"max_tokens":{"title":"Max Tokens","type":"integer"},"next_run_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Next Run At"},"prompt":{"title":"Prompt","type":"string"},"reasoning_every_runs":{"title":"Reasoning Every Runs","type":"integer"},"reasoning_max_tokens":{"title":"Reasoning Max Tokens","type":"integer"},"run_requested":{"title":"Run Requested","type":"boolean"},"schedule_enabled":{"title":"Schedule Enabled","type":"boolean"}},"required":["schedule_enabled","interval_minutes","prompt","max_tokens","reasoning_max_tokens","reasoning_every_runs","next_run_at","run_requested","alert_emails"],"title":"HealthCheckSettingsPublic","type":"object"}}},"paths":{"/api/v1/health-checks":{"get":{"description":"The settings, the run in progress, and the latest finished run by provider and by offering.","operationId":"health-checks-get_health_check_status","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheckStatus"}}},"description":"Successful Response"}},"summary":"Get Health Check Status","tags":["health-checks"]}}}}
```

## Disable Failing Models

> Stop serving every model the latest run found failing, on its hosted provider.\
> \
> Each stays listed on the Hosted providers page, priced, to be switched back on there.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"HealthCheckDisabled":{"description":"What switching off the failing models did.","properties":{"disabled":{"description":"How many models were switched off on their hosted provider.","title":"Disabled","type":"integer"}},"required":["disabled"],"title":"HealthCheckDisabled","type":"object"}}},"paths":{"/api/v1/health-checks/disable-failing":{"post":{"description":"Stop serving every model the latest run found failing, on its hosted provider.\n\nEach stays listed on the Hosted providers page, priced, to be switched back on there.","operationId":"health-checks-disable_failing_models","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheckDisabled"}}},"description":"Successful Response"}},"summary":"Disable Failing Models","tags":["health-checks"]}}}}
```

## Run Health Checks

> Start a run within a minute, whether or not the schedule is on.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"HealthCheckSettingsPublic":{"description":"Whether the checks run, how often, and what they send.","properties":{"alert_emails":{"items":{"type":"string"},"title":"Alert Emails","type":"array"},"interval_minutes":{"title":"Interval Minutes","type":"integer"},"max_tokens":{"title":"Max Tokens","type":"integer"},"next_run_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Next Run At"},"prompt":{"title":"Prompt","type":"string"},"reasoning_every_runs":{"title":"Reasoning Every Runs","type":"integer"},"reasoning_max_tokens":{"title":"Reasoning Max Tokens","type":"integer"},"run_requested":{"title":"Run Requested","type":"boolean"},"schedule_enabled":{"title":"Schedule Enabled","type":"boolean"}},"required":["schedule_enabled","interval_minutes","prompt","max_tokens","reasoning_max_tokens","reasoning_every_runs","next_run_at","run_requested","alert_emails"],"title":"HealthCheckSettingsPublic","type":"object"}}},"paths":{"/api/v1/health-checks/run":{"post":{"description":"Start a run within a minute, whether or not the schedule is on.","operationId":"health-checks-run_health_checks","responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheckSettingsPublic"}}},"description":"Successful Response"}},"summary":"Run Health Checks","tags":["health-checks"]}}}}
```

## Get Health Check Settings

> Whether the checks run on a schedule, how often, and what they send.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"HealthCheckSettingsPublic":{"description":"Whether the checks run, how often, and what they send.","properties":{"alert_emails":{"items":{"type":"string"},"title":"Alert Emails","type":"array"},"interval_minutes":{"title":"Interval Minutes","type":"integer"},"max_tokens":{"title":"Max Tokens","type":"integer"},"next_run_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Next Run At"},"prompt":{"title":"Prompt","type":"string"},"reasoning_every_runs":{"title":"Reasoning Every Runs","type":"integer"},"reasoning_max_tokens":{"title":"Reasoning Max Tokens","type":"integer"},"run_requested":{"title":"Run Requested","type":"boolean"},"schedule_enabled":{"title":"Schedule Enabled","type":"boolean"}},"required":["schedule_enabled","interval_minutes","prompt","max_tokens","reasoning_max_tokens","reasoning_every_runs","next_run_at","run_requested","alert_emails"],"title":"HealthCheckSettingsPublic","type":"object"}}},"paths":{"/api/v1/health-checks/settings":{"get":{"description":"Whether the checks run on a schedule, how often, and what they send.","operationId":"health-checks-get_health_check_settings","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheckSettingsPublic"}}},"description":"Successful Response"}},"summary":"Get Health Check Settings","tags":["health-checks"]}}}}
```

## Update Health Check Settings

> Change the settings. Turning the schedule on starts a run within a minute.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"HealthCheckSettingsUpdate":{"additionalProperties":false,"description":"Settings to change. An omitted field keeps its value.","properties":{"alert_emails":{"anyOf":[{"items":{"type":"string"},"maxItems":20,"type":"array"},{"type":"null"}],"description":"Who is emailed when a model stops answering and when it answers again. An empty list emails nobody.","items":{"format":"email","type":"string"},"title":"Alert Emails"},"interval_minutes":{"anyOf":[{"maximum":1440,"minimum":15,"type":"integer"},{"type":"null"}],"description":"Minutes between scheduled runs.","title":"Interval Minutes"},"max_tokens":{"anyOf":[{"maximum":4096,"minimum":1,"type":"integer"},{"type":"null"}],"description":"Output cap for a model that does not reason.","title":"Max Tokens"},"prompt":{"anyOf":[{"maxLength":2000,"minLength":1,"type":"string"},{"type":"null"}],"description":"The user message every model is sent. A check passes on any answer, whatever it says.","title":"Prompt"},"reasoning_every_runs":{"anyOf":[{"maximum":48,"minimum":0,"type":"integer"},{"type":"null"}],"description":"Include reasoning models every Nth run; 0 leaves them out.","title":"Reasoning Every Runs"},"reasoning_max_tokens":{"anyOf":[{"maximum":8192,"minimum":1,"type":"integer"},{"type":"null"}],"description":"Output cap for a reasoning model.","title":"Reasoning Max Tokens"},"schedule_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Run the checks on a schedule.","title":"Schedule Enabled"}},"title":"HealthCheckSettingsUpdate","type":"object"},"HealthCheckSettingsPublic":{"description":"Whether the checks run, how often, and what they send.","properties":{"alert_emails":{"items":{"type":"string"},"title":"Alert Emails","type":"array"},"interval_minutes":{"title":"Interval Minutes","type":"integer"},"max_tokens":{"title":"Max Tokens","type":"integer"},"next_run_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Next Run At"},"prompt":{"title":"Prompt","type":"string"},"reasoning_every_runs":{"title":"Reasoning Every Runs","type":"integer"},"reasoning_max_tokens":{"title":"Reasoning Max Tokens","type":"integer"},"run_requested":{"title":"Run Requested","type":"boolean"},"schedule_enabled":{"title":"Schedule Enabled","type":"boolean"}},"required":["schedule_enabled","interval_minutes","prompt","max_tokens","reasoning_max_tokens","reasoning_every_runs","next_run_at","run_requested","alert_emails"],"title":"HealthCheckSettingsPublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/health-checks/settings":{"patch":{"description":"Change the settings. Turning the schedule on starts a run within a minute.","operationId":"health-checks-update_health_check_settings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheckSettingsUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheckSettingsPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Update Health Check Settings","tags":["health-checks"]}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.otari.ai/otari/for-integrators/api-reference/health-checks.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
