Skip to main content
Docs

Search guides and API endpoints, for example “Idempotency-Key” or “submit job”.

    API reference

    CogniChem REST API

    97 endpoints for jobs, workflows, the Assistant, and your account, generated from the API's OpenAPI 3.1.0 spec (version 1.0.0).
    On this page

    Base URL

    Every endpoint lives under https://api.cognichem.com/api/v1. Requests and responses are JSON unless an endpoint says otherwise.

    Authentication

    Send an API key in the X-Api-Key header. Create keys in your CogniChem account and keep them out of source code: the examples read one from COGNICHEM_API_KEY.

    curl "https://api.cognichem.com/api/v1/auth/check" \
      -H "X-Api-Key: $COGNICHEM_API_KEY"

    Endpoints marked Access token only (API key management and the Assistant) need a signed-in access token instead, sent as Authorization: Bearer …. Get one from Log in with email and password.

    Errors

    Failed requests return an RFC 7807 problem detail (application/problem+json) with the HTTP status, a title and detail, the request_id to quote to support, and a retryability hint: retry upstream and timeout errors with backoff, fix the request for validation, and wait or top up for quota. Validation errors (422) list each problem in errors.

    Safe retries

    14 endpoints that start or save something take an Idempotency-Key header, and calls made with an API key must send one. Use a new unique key (a UUID) for each request and the same key when you retry it: a repeat returns the first result instead of doing the work twice, and the same key with a different body is a 409. Idempotency has the details.

    Charges

    5 endpoints are marked Charges your wallet. Submitting a job or workflow run (or approving one the Assistant proposed) reserves its estimated cost, and the charge settles at the actual runtime when the work finishes. An Assistant turn holds funds for the tokens it may use and debits what it uses.

    Utility and inference calls are marked Counts toward monthly limits: they are not charged to your wallet but use your plan's monthly allowance. Check it with Get usage and limits.

    Price a job first with Estimate job reservation cost or a workflow with Estimate a workflow run's cost; neither charges anything.

    Endpoints

    The raw OpenAPI document is at https://api.cognichem.com/openapi.json.