SDK reference / TypeScript

Typed against the same v1 contract.

The low-level TypeScript client is generated from OpenAPI and contract-checked in CI. Public registry publication remains gated on the SDK reliability phase.

Generated operations

The client schema includes every operation listed below.

  • getCapabilities: GET /v1/capabilities
  • getFile: GET /v1/files/{file_id}
  • deleteFile: DELETE /v1/files/{file_id}
  • completeFileUpload: POST /v1/files/{file_id}/complete
  • listJobs: GET /v1/jobs
  • createJob: POST /v1/jobs
  • getJob: GET /v1/jobs/{job_id}
  • deleteJob: DELETE /v1/jobs/{job_id}
  • cancelJob: POST /v1/jobs/{job_id}/cancel
  • listJobOutputs: GET /v1/jobs/{job_id}/outputs
  • createJobOutput: POST /v1/jobs/{job_id}/outputs
  • getOutput: GET /v1/outputs/{output_id}
  • getOutputContent: GET /v1/outputs/{output_id}/content
  • createUploadIntent: POST /v1/upload-intents
  • getUsage: GET /v1/usage
  • listWebhookEndpoints: GET /v1/webhook-endpoints
  • createWebhookEndpoint: POST /v1/webhook-endpoints
  • updateWebhookEndpoint: PATCH /v1/webhook-endpoints/{endpoint_id}
  • deleteWebhookEndpoint: DELETE /v1/webhook-endpoints/{endpoint_id}
  • listWebhookDeliveries: GET /v1/webhook-endpoints/{endpoint_id}/deliveries
  • replayWebhookDelivery: POST /v1/webhook-endpoints/{endpoint_id}/deliveries/{delivery_id}/replay
  • pauseWebhookEndpoint: POST /v1/webhook-endpoints/{endpoint_id}/pause
  • resumeWebhookEndpoint: POST /v1/webhook-endpoints/{endpoint_id}/resume
  • rotateWebhookEndpointSecret: POST /v1/webhook-endpoints/{endpoint_id}/rotate-secret
  • testWebhookEndpoint: POST /v1/webhook-endpoints/{endpoint_id}/test

Workspace usage

Repository contributors can use @getmd/client. External users should use the documented fetch example until a registry release is announced.

Workspace TypeScriptts
import { createGetMdClient } from '@getmd/client';

const client = createGetMdClient({
  baseUrl: 'https://api.getmd.xyz',
  accessToken: process.env.GETMD_API_KEY!
});

Compatibility policy

Generated types follow the v1 OpenAPI contract. Ergonomic clients add bounded retries, cursor pagination, direct uploads, webhook verification, and create-and-wait helpers without redefining HTTP behavior.