Docs OpenAPI

Docs / Jobs

Ask for a job

POST/v1/jobs

Only a customer's key may ask. The job holds the most it may cost from the customer's credits until it completes: each reaction at its kind's rate (GET /v1/prices), or a synthesis's max_credits. To retry a call that may have failed, such as one that timed out, send it again with the same Idempotency-Key: that gives back the job the first call made rather than a second one.

View as Markdown

Headers

  • AuthorizationBearer keyrequired#

    An API key. Request access to get one.

  • Idempotency-Keystring or null#

    1 to 255 visible ASCII characters that name this request.

Body

JobRequest, as application/json

  • exclusivebooleanrequired#

    Whether only this customer may ever see the job's results. It cannot change later.

  • reusebooleanrequired#

    Whether the lab may hand back results it already measured for the same reaction, at the reuse rate, instead of running it again. The match is exact: every field the two reactions state must agree, and an earlier synthesis must have been for at least the amount, with a measured purity of at least the purity asked for.

  • workWork (one of 4 kinds, by kind)required#

    Which of the four jobs this is, and what it needs. kind says which.

    Chemists review a route to a target and say what they would change. It hands back their review and no rewards.

    • kind"route_review"required#
    • routearray of Reaction, at least 1required#

      The route's reactions, in order.

      Show 7 fields of Reaction
      • idName (string, at most 200 chars, pattern)required#

        The customer's own name for the reaction, unique within the job. Its rewards carry it.

      • materialsarray of PlannedMaterial, at least 1required#
      • product_smilesSmiles (string, pattern ^[!-~]+$)required#

        A molecule as SMILES. The lab checks the chemistry; the API checks only that it is printable ASCII without spaces.

      • procedureText (string, pattern) or null#

        Text that says something, such as a procedure: not empty, not all spaces, and with no NUL character. It may hold line breaks.

      • scale_mmolPositive (number, above 0, at most 1012) or null#

        The amount of the limiting reactant. The lab chooses it when absent.

      • temperature_cCelsius (number, -273.15 to 5000) or null#

        A temperature in degrees Celsius, from absolute zero to 5000.

      • time_hPositive (number, above 0, at most 1012) or null#

        An amount greater than zero, up to 1012.

    • target_smilesSmiles (string, pattern ^[!-~]+$)required#

      A molecule as SMILES. The lab checks the chemistry; the API checks only that it is printable ASCII without spaces.

Responses

201The job, new or made by an earlier call with the same idempotency key.
401Send a valid API key as Authorization: Bearer <key>.
402The job may cost more than the balance, or than is left of the key's limit.
403The key is not a customer's.
409The idempotency key was used for a different request.
413The body is larger than 1 MiB.
415The body is not sent as application/json.
422A parameter or the body does not parse.
500Something went wrong on our side.
503This kind of job has no price yet.

201 returns Job. Every error is a Problem, whose detail says what went wrong.