Get started
AI quickstart
Give your assistant the Red API skill. It includes the public endpoint schema and instructions for authentication, sandbox scans, and reading a result.
Set up your assistant
Extract the ZIP, then move the entire heymilo-red-api folder into your project at the location below.
Cursor
.cursor/skills/heymilo-red-api/Open Agent in the same project and type /heymilo-red-api.
Cursor skill setupClaude Code
.claude/skills/heymilo-red-api/Start Claude Code in the project and type /heymilo-red-api.
Claude Code skill setupGitHub Copilot
.github/skills/heymilo-red-api/Open the workspace in VS Code and ask Copilot Chat to use the heymilo-red-api skill.
GitHub Copilot skill setupUsing Claude or ChatGPT in a browser? Attach the Markdown instructions to a chat and paste the prompt below.
Make your first request
Create a sandbox key with scans:read and scans:create in the Red console. Set RED_API_KEY in your server environment. The assistant can read the schema and write tests before you provide a key.
Use the heymilo-red-api skill to build a client in this repo. Read RED_API_KEY from the server environment. First list one sandbox scan to check connectivity. Then add a function that submits a recording URL and polls until COMPLETED or FAILED. Return the verdict and timestamped findings. Test both outcomes with mocked HTTP.A successful list request returns HTTP 200. An empty data array is expected in a new workspace. Continue with your first sandbox scan.
Prompts for implementation and review
Coding agent
Add a HeyMilo Red integration to this codebase. Red scans interview recordings for integrity risks.
Base URL: https://red-api.apps.heymilo.cloud
Auth: send the header x-api-key with the value of the RED_API_KEY environment variable. Never hardcode the key.
Sandbox: a key starting HM-RED-SANDBOX- runs free scans that return canned results in about 3 seconds and never download the video. Add "sandbox_scenario": "clean" | "flagged" | "failed" to pick the outcome; a live key rejects that field with 422. Every scan and webhook carries livemode, false for sandbox.
1. POST /v1/scans with JSON { "video_url": "<HTTPS URL; a presigned link must stay valid until the scan finishes>", "external_id": "<my id>", "webhook_url": "<optional HTTPS URL>", "metadata": { "<key>": "<string>" } }. Red answers 202 with a scan_id and status PENDING. Sending webhook_url needs the webhooks:manage scope, or Red answers 403.
2. Either wait for the signed scan.completed / scan.failed webhook, or poll GET /v1/scans/{scan_id} every 5 seconds until status is COMPLETED or FAILED. Both are terminal: stop polling on either.
3. On COMPLETED, read result.verdict (risk_level, recommended_action, summary) and result.findings (category, check, risk_level, confidence, starts_at_sec, ends_at_sec, summary).
4. On FAILED, read the top-level error string and surface it. Do not resubmit automatically.
5. On 429, wait the number of seconds in the Retry-After header, then retry. On other transient errors, back off exponentially from 5 seconds up to 2 minutes.
6. Webhooks carry red-signature: t=<unix>,v1=<hex HMAC-SHA256 of "{t}.{raw body}">, keyed with the endpoint's signing secret, or the workspace webhook secret for scans sent with webhook_url. Verify the raw bytes before parsing and reject timestamps more than 5 minutes old. Deduplicate on the event id.
Write a small client module with createScan, getScan and waitForScan, plus a webhook handler that verifies the signature. Add tests that mock HTTP. Follow this repo's existing conventions.Chat assistant
Use the HeyMilo Red API to scan one interview recording and tell me the verdict.
Base URL: https://red-api.apps.heymilo.cloud
Auth: send the header x-api-key with the value of the RED_API_KEY environment variable. Never hardcode the key.
Sandbox: a key starting HM-RED-SANDBOX- runs free scans that return canned results in about 3 seconds and never download the video. Add "sandbox_scenario": "clean" | "flagged" | "failed" to pick the outcome; a live key rejects that field with 422. Every scan and webhook carries livemode, false for sandbox.
1. POST /v1/scans with JSON { "video_url": "<HTTPS URL; a presigned link must stay valid until the scan finishes>", "external_id": "<my id>", "webhook_url": "<optional HTTPS URL>", "metadata": { "<key>": "<string>" } }. Red answers 202 with a scan_id and status PENDING. Sending webhook_url needs the webhooks:manage scope, or Red answers 403.
2. Either wait for the signed scan.completed / scan.failed webhook, or poll GET /v1/scans/{scan_id} every 5 seconds until status is COMPLETED or FAILED. Both are terminal: stop polling on either.
3. On COMPLETED, read result.verdict (risk_level, recommended_action, summary) and result.findings (category, check, risk_level, confidence, starts_at_sec, ends_at_sec, summary).
4. On FAILED, read the top-level error string and surface it. Do not resubmit automatically.
5. On 429, wait the number of seconds in the Retry-After header, then retry. On other transient errors, back off exponentially from 5 seconds up to 2 minutes.
6. Webhooks carry red-signature: t=<unix>,v1=<hex HMAC-SHA256 of "{t}.{raw body}">, keyed with the endpoint's signing secret, or the workspace webhook secret for scans sent with webhook_url. Verify the raw bytes before parsing and reject timestamps more than 5 minutes old. Deduplicate on the event id.
Ask me for the video URL if I haven't given one. Report the verdict summary, the recommended action and each finding with its timestamp range.Give your agent the docs
Use the documentation index to find a guide, or choose Copy page on an endpoint to copy its examples as Markdown.