mymolecules

Start a job

Some requests take longer to process. When one of these requests is accepted, the API responds with HTTP 202. Save the status_url from the response; it points to your job.

{
  "data": {
    "job_id": "8a93f4a0-2222-4a10-8c93-bca31ae9d48b",
    "status": "queued",
    "status_url": "<STATUS_URL_RETURNED_BY_API>"
  },
  "meta": {
    "request_id": "req_...",
    "api_version": "2026-07-10"
  }
}

Check the job’s progress

Save the returned status_url as STATUS_URL, then send a GET request with the same API key and version header. Wait a few seconds between checks, or use meta.retry_after_seconds when provided. Keep going while the status is queued or processing. Use the URL as provided rather than building it yourself.

curl "$STATUS_URL" \
  -H "x-api-key: $MYMOLECULES_API_KEY" \
  -H "mymolecules-api-version: 2026-07-10"

Read the result

Stop checking when the job reaches a final status. A successful status request returns HTTP 200, even if the job itself failed.

  • queued or processing: The job is still running. Check again after a short pause.
  • completed: The job is done. Read the output in data.result.
  • failed: The job stopped without a result. Read data.error for the reason; do not treat HTTP 200 as job success.
  • Temporary HTTP error: Retry with backoff for transient failures such as 429 or 503, and follow Retry-After when present. Set a timeout for your own polling loop.