Skip to main content
The complete opentrain command surface on one page. Every command supports --json (raw API response) and --base-url <url> (override the API origin); those two flags are omitted from the per-command tables below. Scope, feature-flag, and claim requirements are those of the wrapped endpoint — follow the Wraps link on each command. See the CLI overview for installation, credentials, and conventions.

Global

Auth and Identity

whoami

Alias of auth status — prints the authenticated user, token label, scopes, and account type. Wraps GET /api/public/v1/auth/me.

auth register

Creates an anonymous agent account and saves the pre-claim ot_pat_ token plus the claim token to the credentials file. Fails if credentials already exist unless --force is passed.
Wraps POST /api/agent/identity.

auth claim

Emails the human owner an invitation to claim the agent-registered account. The claim token defaults to the one saved by auth register. Wraps POST /api/agent/identity/claim.

auth claim-status

Checks whether the human completed the claim. On success the saved token is upgraded automatically to the claimed account’s scopes. Without --wait it checks once and reports pending; with --wait it polls (respecting slow_down backoff) until claimed or the timeout elapses.
Wraps POST /api/agent/oauth/token.

auth login

Verifies an existing ot_pat_ token against the API, then saves it to the credentials file. Wraps GET /api/public/v1/auth/me for verification.

auth status

Same as whoami. Wraps GET /api/public/v1/auth/me.

auth logout

Deletes the saved credentials file. Purely local — it does not revoke the token; use tokens revoke for that.

Jobs

jobs draft create

Creates an unpublished draft from a plain-text job description (the primary workflow) or a structured payload. The response includes the validation state: each missing field carries an ask: question, type, allowed enum values, and the field name to set with jobs draft update. Alias: jobs create.
Wraps POST /api/public/v1/job-drafts.

jobs draft update

Fills in or corrects fields on an unpublished draft. --set values are auto-coerced (numbers, booleans, JSON arrays; everything else stays a string); repeat the loop until the draft is publish-ready. Alias: jobs update.
Wraps PATCH /api/public/v1/job-drafts/{jobId}.

jobs list

Lists your own jobs with publish state, proposal counts, and live URLs. Wraps GET /api/public/v1/jobs/mine.
Searches the public marketplace (all live jobs, not just yours). No token required. Wraps GET /api/public/v1/jobs.

jobs publish

Publishes a publish-ready draft live on the marketplace, running the same validation and moderation pipeline as the in-app flow. Subject to daily publish limits. Wraps POST /api/public/v1/jobs/{id}/publish.

jobs invite

Invites an AI trainer to a published job, creating a proposal. Idempotent — re-inviting returns the existing proposal. Wraps POST /api/public/v1/jobs/{id}/invites.

jobs close

Archives a published job: it stops accepting proposals and leaves public listings. Existing contracts are unaffected. Idempotent. Wraps POST /api/public/v1/jobs/{id}/close.

jobs update-published

Patches a live (OPEN) job using the same field names and --set/--patch-file/--patch-json flags as jobs draft update. The revised listing is re-moderated; a blocked result unpublishes the job back to draft. Wraps PATCH /api/public/v1/jobs/{id}.

Proposals and Candidates

proposals list

Lists proposals for a job with statuses, bids, and AI-interview scores — the ranking view for deciding who to interview or hire. Wraps GET /api/public/v1/jobs/{id}/proposals.

proposals get

Reads the full candidate evaluation: bid, AI-interview score and summary, verification, assessment results, and contract state. --interview also fetches the sanitized AI-interview transcript. Alias: proposal get. Wraps GET /api/public/v1/proposals/{proposalId} and, with --interview, GET /proposals/{proposalId}/interview.

proposals hire

Requests a hire — never hires anyone or moves money. Records a pending approval and returns 202 with an approvalUrl a signed-in human must confirm in the OpenTrain app; on confirm, the contract is created and the first escrow milestone funded. A 409 payment_method_required includes a billingUrl a human must visit. Alias: proposal hire.
Wraps POST /api/public/v1/proposals/{proposalId}/hire.

freelancers get

Reads a masked AI trainer profile (skills, stats, work and labeling experience, education, reviews) by user id or public profile slug. Names stay masked to first name + last initial; personal contact details are never returned. Alias: freelancer get. Wraps GET /api/public/v1/freelancers/{idOrSlug}.

Messages

messages list

Lists conversation summaries you participate in, with unread counts and the latest message. Wraps GET /api/public/v1/messages.

messages unread

Shorthand for messages list --unread-only — only conversations with unread messages.

messages read

Reads messages inside one conversation, paginated in either direction. Wraps GET /api/public/v1/messages?conversationId=....

messages send

Sends a plain-text message (max 10,000 chars) into an existing conversation. Use --content-file <path> to read the message body from a file. Wraps POST /api/public/v1/messages.

messages start-proposal-thread

Opens (or fetches) the pre-hire direct-message thread for a proposal — idempotent get-or-create, employer side only. Returns the conversationId to use with messages send. Wraps POST /api/public/v1/proposals/{proposalId}/conversation.

Contracts and Milestones

contracts list

Lists contracts (hired AI trainers) with milestones, the masked freelancer identity (first name + last initial), and the post-hire job DM conversationId. Wraps GET /api/public/v1/contracts.

contracts get

Reads one contract in detail. Alias: contract get. Wraps GET /api/public/v1/contracts/{contractId}.

contracts end

Ends a contract. With no funded milestones it ends immediately; with funded escrow at stake it returns a pending approval with an approvalUrl a human must confirm. Wraps POST /api/public/v1/contracts/{contractId}/end.

milestones create

Adds an unfunded milestone to an active contract — no money moves at creation. Wraps POST /api/public/v1/contracts/{contractId}/milestones.

milestones fund

Requests escrow funding. No money moves: the response is a pending approval with an approvalUrl a signed-in human must open and confirm (expires in ~72 h). Track with approvals get or updates poll. Wraps POST /api/public/v1/milestones/{milestoneId}/fund.

milestones approve

Requests release of a funded milestone’s escrow. Same human co-sign pattern as milestones fund. Wraps POST /api/public/v1/milestones/{milestoneId}/approve.

approvals get

Checks a pending human co-sign approval: pending, confirmed, declined, or expired, plus the execution result once confirmed. Alias: approval get. Wraps GET /api/public/v1/approvals/{approvalId}.

Credits

credits show

Reads the prepaid credit balance — available vs reserved (escrow-held) — plus recent ledger activity. Alias: credits balance. Wraps GET /api/public/v1/credits.

credits ledger

Pages the full ledger of top-ups, holds, releases, captures, refunds, and adjustments, newest first. Wraps GET /api/public/v1/credits/ledger.

credits top-up

Starts a Stripe Checkout top-up (1010–10,000) and returns a checkoutUrl a human must open and pay — no money moves from the command itself. Wraps POST /api/public/v1/credits/top-ups.

credits top-up-status

Checks a top-up: pending (awaiting payment), completed, canceled, or expired. Wraps GET /api/public/v1/credits/top-ups/{topUpId}.

Updates

updates poll

Polls the account delta feed — small ID-only events for new proposals, messages, contracts, milestone changes, and pending payments. Persist the returned nextCursor and pass it as --cursor on the next poll. Wraps GET /api/public/v1/updates.

Webhooks

webhooks create

Subscribes an HTTPS URL to platform events. The response includes the signing secret once — store it and use it to verify the X-OpenTrain-Signature header. Wraps POST /api/public/v1/webhooks.

webhooks list

Lists subscriptions with status (ACTIVE or DISABLED). Secrets are never included. Wraps GET /api/public/v1/webhooks.

webhooks get

Reads one subscription, including disable details after sustained delivery failure. The id can also be passed as --webhook-id. Alias: webhook get. Wraps GET /api/public/v1/webhooks/{webhookId}.

webhooks delete

Deletes a subscription and stops deliveries. Deleting and re-creating is also how a DISABLED subscription is resumed (the new one gets a new secret). Wraps DELETE /api/public/v1/webhooks/{webhookId}.

Tokens

tokens list

Lists every API token on the account — names, scopes, status, expiry. Secrets are never returned. Wraps GET /api/public/v1/tokens.

tokens revoke

Revokes a token by id — immediate and irreversible. Revoking the token the CLI is currently using breaks subsequent commands. Wraps DELETE /api/public/v1/tokens/{tokenId}.
There is no tokens create command — mint new tokens over HTTP with POST /tokens or in the OpenTrain app’s settings.

Team

team show

Reads the employer team: organization, members with roles, and pending invites. Wraps GET /api/public/v1/team.

team invite

Emails a human an invitation to join the team with shared job and inbox access. Wraps POST /api/public/v1/team/invites.

Payments

payments pending

Reads pending payment and milestone state visible to the token owner. Read-only — it never releases funds or changes payment settings. Wraps GET /api/public/v1/payments/pending.