Skip to main content
The Ochy developer portal is the self-service interface for your API account. Sign in with your self-serve developer account or, for organizations, with an organization admin account (see get API access). The portal has the following tabs:
The API section of the Ochy web app (Channels > API) has moved to the developer portal. For organization scopes, only organization admins can generate, rotate, or revoke API keys and change webhooks and settings.

API key management

Your API key authenticates every request to the Partner API. See authentication for how to pass it in your requests.

Generate a key

If you do not have an active key yet:
1

Open the Integration tab

Sign in to developers.ochy.io and select the Integration tab (or use the Get started checklist).
2

Click Generate API Key

The portal creates a new key and displays it once. Self-serve developer accounts must verify their email address before they can generate a key.
3

Copy and store your key

Click the copy icon to save the key to your clipboard. Store it in a secure location such as an environment variable or a secrets manager.
The full key is shown only once, immediately after generation. If you navigate away without copying it, you will need to rotate the key to get a new one.

Rotate a key

Rotation revokes the current key and generates a replacement in a single step. Use this when you need a fresh key without downtime between revoke and generate.
1

Click Rotate Key

A confirmation dialog warns that existing integrations will stop working immediately.
2

Confirm the rotation

The old key is revoked and a new key appears in the banner. Copy it before leaving the page.
3

Update your integrations

Replace the old key in every service that calls the Ochy API.

Revoke a key

Revoking permanently deactivates the key. Any request using the revoked key will receive a 403 Invalid API Key error.
1

Click Revoke Key

A confirmation dialog explains that integrations using this key will stop working.
2

Confirm revocation

The key is deactivated. You can generate a new key at any time from the same tab.

Webhooks overview

Instead of calling GET /analysis/{analysis_id}/results repeatedly, you can ask Ochy to push status updates to an HTTPS endpoint you control. Your server receives JSON payloads as the analysis moves from queued to running, through progress milestones, to success or failure.
Webhooks are optional. Polling remains fully supported for debugging, gradual rollouts, or when delivery issues occur.
The integration flow:
  1. Register a webhook URL once for your partner account — from the developer portal or with PUT /webhook. Use GET /webhook to read the current URL, enabled flag, signature status, and updated_at.
  2. Opt in per analysis when you call POST /analysis/start with notify_via_webhook: true. If you omit it or set it to false, no webhook events are sent for that analysis.
  3. Optionally enable HMAC signatures so your server can verify that events were sent by Ochy and that the request body was not modified.
  4. Handle incoming POST requests on your URL. Each payload includes an event type, status, percentage, a monotonic sequence per analysis, and a timestamp.
Delivery is asynchronous: your endpoint should respond quickly (for example 2xx) and process the payload in the background if needed.
Each event is delivered at most once: Ochy makes a single attempt with a 10-second timeout and does not retry after a failure, timeout, or non-2xx response. Keep a slow fallback poll for analyses that have not reached a terminal event. See delivery guarantees.

Configure webhooks

You configure the webhook once per partner; you do not pass the URL on every POST /analysis/start.

From the developer portal

You need an active API key before you can configure a webhook.
1

Open the Integration tab

Sign in to developers.ochy.io and scroll to the webhook section of the Integration tab.
2

Enter your endpoint URL

Provide an HTTPS URL where Ochy will send POST requests. For example: https://your-app.com/webhooks/ochy.
3

Save the webhook

Click Save Webhook. The webhook is enabled automatically.
The URL must use HTTPS and its host must resolve to a public address. URLs that point to a private, loopback, or link-local address (for example 10.0.0.5, 127.0.0.1, or 169.254.169.254) are rejected with 400 and code invalid_webhook_url.
Once configured, use the toggle switch to enable or disable delivery without removing the URL. Click Edit URL to change the endpoint, then Update Webhook to save. Click Send Test Event to send a sample payload to your endpoint. The portal displays the HTTP status code and response latency so you can verify connectivity.
The test button is only available when the webhook is enabled. Toggle it on first if you need to test.

From the API

GET /webhook returns the stored url, enabled, and updated_at for your partner. If nothing has been saved yet, the response body is an empty JSON object ({}).
Use PUT /webhook with a JSON body:
A successful PUT returns the same shape as GET: url, enabled, and updated_at. If you enable signatures for the first time, the response also includes a signature.secret. Copy and store it immediately; it is not returned by GET /webhook. Example response when a signing secret is generated:
Store signature.secret securely. Ochy only returns the full signing secret when it is generated or rotated.
When notify_via_webhook is true on start, the API checks that your partner webhook is valid and enabled. If it is not, the request is not rejected: the analysis starts with notifications disabled, and no events are sent for it. The decision to send webhooks for that analysis is fixed at start time and stored with the analysis.

Start an analysis with webhooks

Add an optional field to the same multipart request you already use for POST /analysis/start: Example (cURL):

Events and payload format

For each analysis, events are emitted when:
  • processing starts (status moves to analyzing);
  • progress crosses each 10% boundary from 10% through 90% (if progress jumps, all crossed milestones are sent in order);
  • the analysis completes successfully (success, 100%);
  • the analysis fails (failed), at any progress value.
Ochy sends POST requests to your webhook URL with a JSON body like:
Completed:
Failed:

Verify webhook signatures

Webhook signatures are optional but recommended for production integrations. Enable them from the developer portal or with signature.enabled: true in PUT /webhook. When signatures are enabled, Ochy adds two HTTP headers to every webhook request, including credits.low events: The signed value is:
To verify a webhook:
  1. Read the raw request body bytes exactly as received.
  2. Read X-Ochy-Timestamp and X-Ochy-Signature.
  3. Reject old timestamps (for example, more than 5 minutes away from your server time).
  4. Compute HMAC-SHA256 with your webhook signing secret over <timestamp>.<raw body>.
  5. Compare the expected signature with X-Ochy-Signature using a constant-time comparison.
Do not parse and re-serialize the JSON before verifying the signature. JSON whitespace or key ordering changes will produce a different signature. Verify against the raw request body.

Python example

Node.js example

Rotate the signing secret

Use POST /webhook/signature/rotate to generate a new signing secret:
The response includes the new secret once:
Update your webhook receiver to use the new secret.

Ordering and out-of-order delivery

Webhook delivery is asynchronous. In rare cases an older event might arrive after a newer one.
  • Each payload includes a sequence that increases for that analysis_id.
  • Process events in sequence order; if you receive a payload whose sequence is less than or equal to the last one you applied for that analysis, you can ignore it.
Ochy also uses internal ordering so that events for a given analysis are published in sequence; this reduces but does not eliminate the need for client-side ordering using sequence.

Delivery guarantees

Ochy sends each event once, with a 10-second timeout. If your endpoint is unreachable, slow, or answers with a non-2xx status, the event is dropped: there is no retry policy. This is intentional. Progress events are only useful when they arrive on time; an update delivered a few seconds late is already outdated. A retry policy would also mean repeatedly calling an endpoint that may be misconfigured (for example a wrong URL). To build a reliable integration:
  • Treat webhooks as a fast notification, not as a guaranteed log. Gaps in sequence are normal.
  • For every analysis without a terminal event (analysis.completed or analysis.failed), poll GET /analysis/{analysis_id}/results at a slow interval such as every 30 seconds, within your rate limit budget.
  • Events only carry analysis_id, which is the video_id returned by POST /analysis/start. They contain no client-side reference. If you never received the video_id, retry the start request with the same Idempotency-Key to get it back (see recovering a lost video_id).

Fallback: polling

You can always call:
This endpoint continues to return the current status and percentage (and full results when status is success), whether or not webhooks are enabled. Use it for integration testing, manual checks, or when you need a single source of truth after delivery issues.

Usage and credits

The Usage & Credits tab of the developer portal shows:
  • Credits — your remaining analysis credits for the scope of your API key (personal or organization). Each analysis consumes one credit when started (see authentication).
  • Usage overview — for the selected period: accepted, successful, and failed analyses, analyses still processing, the success rate, and a chart of side view and back view analyses over time. Only analyses started through the Partner API are counted.
To add credits: self-serve developers buy them in the same tab (see get API access); organizations go through their Ochy contact. Analyses started with your API key are listed in the Latest analyses tab, where you can open each result in an interactive viewer. They do not appear in the Ochy mobile app or web app.

Low-credit alerts

Get warned before your balance runs out. Configure the alert in the portal Settings tab or with PUT /settings/low-credit-alerts: When the alert fires:
  • An email is sent to the person who last saved the alert settings.
  • If webhookUrl is set, Ochy sends a POST request with a credits.low event to it.
The alert fires once per crossing: it rearms when the balance rises above the threshold again (for example after buying credits), and it fires at most once per hour. Only credits consumed by analyses trigger it. Scopes with unlimited credits cannot configure alerts.
When webhook signatures are enabled, credits.low requests carry the same X-Ochy-Timestamp and X-Ochy-Signature headers, signed with the same secret. Delivery is attempted once with a 10-second timeout and redirects are not followed, so respond with a 2xx quickly and keep an eye on your balance in the portal as a fallback.

Data retention

By default, Ochy keeps analysis videos and data indefinitely. In the portal Settings tab, you can set two independent retention periods: Retention applies only to analyses started after you save the settings; the expiry date is fixed when the analysis starts. Expired content is deleted by a daily job. What changes in the API responses:
  • After the video retention period, GET /analysis/{analysis_id}/results still returns biomechanical_analysis, but thumbnail and output_video are omitted and video_expired is true.
  • After the analysis data retention period, the analysis is deleted and requests for it return 404.
Deletion is permanent. Copy any results you need to keep to your own storage before they expire.

See also