Skip to content
OpenTrain AIOpenTrain AIOpenTrain AIDocs

Ask OpenTrain

Answers from the documentation, with sources.

What would you like to do with OpenTrain?

AI answers can be mistaken. Check the linked sources. Don’t include private account information.

Open app

DEVELOPER DOCUMENTATION

Annotation Platforms Overview

Connect OpenTrain hiring to your annotation platform with lifecycle webhooks that signal when to provision or offboard AI trainers.

The OpenTrain Platform API lets annotation platforms plug OpenTrain’s AI trainer marketplace into their own product — whether you run a commercial data labeling platform or internal annotation tooling at an AI lab or enterprise. Your customers hire AI trainers on OpenTrain (with OpenTrain handling vetting, contracts, escrow, and payouts), and OpenTrain tells your platform exactly when each hired AI trainer should gain or lose access to your workspace.

Base URL: https://app.opentrain.ai/api/partner/v1
Auth: Authorization: Bearer ot_ptk_...
Annotation Platforms Overview diagram
View diagram source
sequenceDiagram
participant Customer as Employer (your customer)
participant OpenTrain
participant Platform as Your platform
Customer->>OpenTrain: Opens your consent deep link and approves scopes
OpenTrain-->>Customer: Shows the ot_ptk_ token once
Customer->>Platform: Pastes the token into your integration settings
Platform->>OpenTrain: POST /project-links (map your project to their job)
Platform->>OpenTrain: POST /webhook-endpoints (subscribe to events)
Customer->>OpenTrain: Hires an AI trainer
OpenTrain-->>Platform: contract.started (signed webhook)
Platform->>Platform: Provision the AI trainer by Work Email
Customer->>OpenTrain: Ends the contract (human co-signed)
OpenTrain-->>Platform: contract.ended
Platform->>Platform: Offboard the AI trainer
  1. Connect. Your customer opens your consent deep link, reviews the scopes your app requests, and approves. OpenTrain mints an install-scoped ot_ptk_… token and shows it once — the customer pastes it into your platform.
  2. Link. Your platform creates a project link mapping one of your projects to the customer’s OpenTrain job. All events are job-keyed, so this mapping is what routes them to you.
  3. Subscribe. Register a webhook endpoint for the lifecycle events you care about.
  4. Provision. When the customer hires, you receive contract.started with the AI trainer’s Work Email (consent permitting) — create or invite their account in your workspace.
  5. Offboard. Ending a contract is a human co-signed action inside OpenTrain. When it completes you receive contract.ended — remove the AI trainer’s access.
  6. Sync usage (optional). Report cumulative per-day work on linked contracts — OpenTrain computes budget consumption against funded milestones and webhooks warn both sides before funded hours or labels run out.

The reference integration implements this entire loop in one self-contained webhook consumer you can adapt to your own platform’s user API.

Each project link declares how hired AI trainers get into your workspace:

ModeWho provisionsWhen to use
PARTNER_WEBHOOK (default, recommended)You — your platform consumes contract.started / contract.ended webhooks and manages accounts itselfYou have a user or membership API and want full control
MANAGED_ADAPTEROpenTrain — the managed-credential path operated by OpenTrainYour platform has no integration surface yet; coordinate with the OpenTrain team

Everything in these docs focuses on PARTNER_WEBHOOK, the mode the reference integration uses.

Every Platform API call carries an install-scoped bearer token:

Terminal window
curl -sS https://app.opentrain.ai/api/partner/v1/installs/current \
-H "Authorization: Bearer $OT_PARTNER_TOKEN"

Tokens start with ot_ptk_ and are minted on the OpenTrain consent screen — shown once, never included in the redirect back to your platform. Each token is bound to a single install (one customer’s grant to your app) and carries exactly the scopes that customer approved. See Consent and Installs for the full lifecycle, including reconnects and revocation.

Registration is self-serve: create your platform app directly in the OpenTrain app — name, redirect URIs, and requested scopes — and your client ID and consent deep link are issued immediately. See Register Your App.