> ## Documentation Index
> Fetch the complete documentation index at: https://docs.models.dunsky.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Maintain API and model integrations

> Learn how to maintain and develop the Dunsky Cloud Platform: maintain api and model integrations. Guidance based on the core-app repository.

The FastAPI backend is the source of truth for core-app API contracts. Frontend types are generated from its exported OpenAPI schema.

## Update a contract

1. Change the relevant backend route and Pydantic models.
2. Update the relevant backend checks.
3. Regenerate the frontend schema and types from `src/platform`:

```bash theme={null}
pnpm run generate:api
```

This command runs `generate:api-schema` and then `generate:api-types`, exporting `src/api/openapi.json` and generating `src/platform/src/types/api.d.ts`. Do not edit these generated artifacts by hand.

## Model integration points

Model routes mount through `core.routes.models.v1`. The frontend `ModelRunner.tsx` maps model choices to the supported `/rest/v1/models/...` routes, configuration dialogs, and input submission. `RunModelPage.tsx` chooses the dashboard or runner layout, while `ModelDownloads.tsx` handles run files.

When extending a model workflow, review all these boundaries, the organization entitlements, and the run-scoped authorization checks. Keep heavy computation outside the request handler and use the existing Databricks and Models API integration.

## Reference scope

Use the generated OpenAPI schema for exact request and response fields. This guide explains the integration workflow; it does not substitute invented payload examples for the schema.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.