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.
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 a403 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 callingGET /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.
The integration flow:
- Register a webhook URL once for your partner account — from the developer portal or with
PUT /webhook. UseGET /webhookto read the current URL,enabledflag, signature status, andupdated_at. - Opt in per analysis when you call
POST /analysis/startwithnotify_via_webhook: true. If you omit it or set it tofalse, no webhook events are sent for that analysis. - Optionally enable HMAC signatures so your server can verify that events were sent by Ochy and that the request body was not modified.
- Handle incoming POST requests on your URL. Each payload includes an event type, status,
percentage, a monotonic
sequenceper analysis, and a timestamp.
2xx) and process the
payload in the background if needed.
Configure webhooks
You configure the webhook once per partner; you do not pass the URL on everyPOST /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.
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 ({}).
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:
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 forPOST /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:
Verify webhook signatures
Webhook signatures are optional but recommended for production integrations. Enable them from the developer portal or withsignature.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:
- Read the raw request body bytes exactly as received.
- Read
X-Ochy-TimestampandX-Ochy-Signature. - Reject old timestamps (for example, more than 5 minutes away from your server time).
- Compute
HMAC-SHA256with your webhook signing secret over<timestamp>.<raw body>. - Compare the expected signature with
X-Ochy-Signatureusing a constant-time comparison.
Python example
Node.js example
Rotate the signing secret
UsePOST /webhook/signature/rotate to generate a new signing secret:
secret once:
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
sequencethat increases for thatanalysis_id. - Process events in
sequenceorder; if you receive a payload whosesequenceis less than or equal to the last one you applied for that analysis, you can ignore it.
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
sequenceare normal. - For every analysis without a terminal event (
analysis.completedoranalysis.failed), pollGET /analysis/{analysis_id}/resultsat a slow interval such as every 30 seconds, within your rate limit budget. - Events only carry
analysis_id, which is thevideo_idreturned byPOST /analysis/start. They contain no client-side reference. If you never received thevideo_id, retry the start request with the sameIdempotency-Keyto get it back (see recovering a lostvideo_id).
Fallback: polling
You can always call: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.
Low-credit alerts
Get warned before your balance runs out. Configure the alert in the portal Settings tab or withPUT /settings/low-credit-alerts:
When the alert fires:
- An email is sent to the person who last saved the alert settings.
- If
webhookUrlis set, Ochy sends aPOSTrequest with acredits.lowevent to it.
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}/resultsstill returnsbiomechanical_analysis, butthumbnailandoutput_videoare omitted andvideo_expiredistrue. - After the analysis data retention period, the analysis is deleted and requests for it return 404.
See also
- Analysis workflow — video requirements, status codes, and polling
GET /webhook— read current webhook settingsPUT /webhook— register or update your webhook URLPOST /webhook/signature/rotate— rotate your webhook signing secretGET /settings/low-credit-alerts— read low-credit alert settingsPUT /settings/low-credit-alerts— configure low-credit alertsPOST /analysis/start—notify_via_webhookfield- Limits and reliability — rate limits, idempotent retries, recovery