OpenAPI

The OpenAPI document describes the public v1 API routes and shared resource shapes.

ProteinIQ publishes an OpenAPI contract for the public API. Use it to inspect route definitions, generate clients, or keep integration tests aligned with the API surface.

Fetch the contract

The OpenAPI contract is served from the static public API asset:

Text
https://proteiniq.io/api/v1/openapi.json

Download it with curl:

Bash
curl -s "https://proteiniq.io/api/v1/openapi.json" -o proteiniq-openapi.json

The contract is public. Data routes still require Authorization: Bearer <key>.

What it covers

The contract includes the public v1 routes:

  • GET /api/v1/account
  • GET /api/v1/tools
  • GET /api/v1/tools/{toolId}
  • POST /api/v1/jobs/quote
  • POST /api/v1/jobs
  • GET /api/v1/jobs
  • GET /api/v1/jobs/{jobId}/status
  • GET /api/v1/jobs/{jobId}/events
  • POST /api/v1/jobs/{jobId}/cancel
  • GET /api/v1/results/{jobId}
  • GET /api/v1/files
  • POST /api/v1/files
  • GET /api/v1/files/{fileId}
  • DELETE /api/v1/files/{fileId}
  • GET /api/v1/openapi.json

Tool-specific schemas

The OpenAPI contract describes the public route and shared request shapes. Tool-specific input, settings, output, and limit metadata should be read from GET /api/v1/tools/{toolId} because each tool has its own contract.

Use this pattern when building clients:

  1. Generate a general client from OpenAPI.
  2. Fetch the tool detail for the selected toolId.
  3. Validate your tool-specific input against the tool detail your integration expects.
  4. Submit through POST /api/v1/jobs.

Generate a TypeScript client

You can use any OpenAPI-compatible generator. For example:

Bash
npx openapi-typescript https://proteiniq.io/api/v1/openapi.json \
  -o proteiniq-api.d.ts

Then use the generated types alongside runtime calls:

TypeScript
type ProteinIqPaths = import("./proteiniq-api").paths;

const response = await fetch("https://proteiniq.io/api/v1/account", {
  headers: {
    Authorization: `Bearer ${process.env.PROTEINIQ_API_KEY}`,
  },
});

const account = await response.json();

Keep clients current

Regenerate clients when you adopt new API routes or fields. For tool contracts, refresh from GET /api/v1/tools/{toolId} at integration setup time or pin the tool contract in your own test fixtures.