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

# Testing and availability

> Verify the Training API update before relying on it in an integration

<Note>
  These pages describe the Training API on `dev`, where authenticated creation, editing, downloads, revert, and website brand lookup have been tested live.
  Production availability is not confirmed. Your API service and worker must both run the updated code.
  See [Testing and availability](/api-reference/testing).
</Note>

## Availability

Live development verification on September 7, 2026 used a real Knowlify API key against `https://web-dev-0acd.up.railway.app`. The API service and worker were updated together. Production was not tested.

Verified behavior:

* Training creation completed, including a locked color palette, and returned downloadable MP4s.
* A title edit progressed through processing and applying to complete. Worker logs confirmed the Remotion/Hera editor and renderer.
* Revert restored a downloaded file byte-for-byte identical to the original.
* Website brand lookup returned live context.dev data after `CONTEXT_DEV_API_KEY` was configured on the API service.
* Missing authentication, invalid inputs, unsupported aspect-ratio changes, and idempotency conflicts returned the expected errors.

Media inspection remains necessary: an API success does not guarantee every creative instruction was followed. In the test, a 10-second request with short, exact narration produced about five seconds of video. Check the generated duration, spoken words, and sampled frames against your requirements.

The API service needs `CONTEXT_DEV_API_KEY` for website brand lookup. This provider credential is separate from the Knowlify key used by clients.

## Local regression tests

With Git and uv installed:

```bash theme={null}
git clone --branch dev \
  https://github.com/knowlify/planner-fastapi.git planner-fastapi-api-test
cd planner-fastapi-api-test
uv sync --frozen
uv run pytest tests/api/test_v1_*.py \
  tests/editing/test_external_edit_contract.py --timeout=90
```

These tests use isolated fixtures; they do not prove that a deployed worker renders correctly.

## Live smoke test

After deploying the updated API and worker to a test environment, store your test key in a private file outside the repository, then run from the backend checkout:

```bash theme={null}
uv run python scripts/test_training_api.py \
  --base-url https://web-dev-0acd.up.railway.app \
  --key-file /secure/path/to/test-key \
  --write \
  --report /tmp/knowlify-training-test.json
```

Replace the base URL if your deployment uses another address. The script can also read `KNOWLIFY_API_KEY` from the environment instead of `--key-file`.

The runner checks invalid input and website brand lookup, creates a short Training video, waits for confirmed rendering, submits a title edit, checks `video_synced`, and requests revert. It writes a JSON report without saving the key. Generation consumes the test account's normal resources.

Without `--write`, it only checks validation and brand lookup; the lookup still calls the external provider. The default brand domain is `stripe.com`; change it with `--brand-domain`. The default polling timeout is 900 seconds per job; change it with `--timeout`.

## Visual verification

Use the report's video identifier to find the test video in the development dashboard. For a manual run, inspect the initial render, then the edited render before reverting: the title should change while narration and timing remain unchanged. Inspect the restored result after revert. The smoke runner checks API state; it does not watch the media or wait for a rebuilt combined file after revert.
