A job is one run of one tool on the hardware you choose. This page computes PaDEL descriptors for two molecules, a small CPU job. You need an API key and some funds in your wallet.
With the Python SDK
pip install cognichem-clientfrom cognichem_client import CogniChem
client = CogniChem.from_env() # reads COGNICHEM_API_KEY
payload = {
"input_data": ["CCO", "c1ccccc1O"],
"input_format": "smiles",
"descriptor_types": ["AtomCount", "RuleOfFive", "ALOGP"],
}
# 1. Price it (nothing is charged).
estimate = client.jobs.estimate(job_type="padel-descriptor", payload=payload)
print(f"Reserves ${estimate.cost:.4f} on {estimate.resource}")
# 2. Submit it. This reserves the estimate from your wallet.
job = client.jobs.submit(job_name="first-job", job_type="padel-descriptor", payload=payload)
# 3. Wait for it to finish, then download the result zip.
status = client.jobs.wait(job.process_id)
if status.status == "completed":
result = client.jobs.result(job.process_id, save_path=".")
print("Saved", result.filename)
else:
print(status.status, status.message)With plain HTTP
1. Price it. Estimate job reservation cost returns what submitting would reserve at your plan's rates. It charges nothing.
curl -X POST https://api.cognichem.com/api/v1/jobs/estimate \
-H "X-Api-Key: $COGNICHEM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"job_type": "padel-descriptor", "payload": {"input_data": ["CCO", "c1ccccc1O"], "input_format": "smiles"}}'2. Submit it. Submit a job returns a process_id (job-…). A job_name must be unique among your jobs, so pick a new one (or delete the old job) to run this again. Calls made with an API key must send an Idempotency-Key: a fresh unique value per job, reused only when you retry the same request. See Idempotency.
curl -X POST https://api.cognichem.com/api/v1/jobs/submit \
-H "X-Api-Key: $COGNICHEM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"job_name": "first-job", "job_type": "padel-descriptor",
"payload": {"input_data": ["CCO", "c1ccccc1O"], "input_format": "smiles"}}'3. Wait for it. Get job status reports queued, dispatched, running, and finally completed, error, or cancelled. Poll every few seconds, backing off to about 30 seconds for long jobs, or long-poll completion events instead.
curl "https://api.cognichem.com/api/v1/jobs/status?process_id=JOB_ID" \
-H "X-Api-Key: $COGNICHEM_API_KEY"4. Download the result. Download a job result returns a zip with the tool's output files.
curl -o result.zip "https://api.cognichem.com/api/v1/jobs/result?process_id=JOB_ID" \
-H "X-Api-Key: $COGNICHEM_API_KEY"What you paid
Submitting reserved the estimate. When the job finished you were charged for the seconds it actually ran, at your plan's rate for that hardware, and the rest of the reservation was released. Your wallet's balance and active_reserved are on Get wallet balance. Jobs explains reservations, failures, and how many jobs can run at once.
Next
- Every tool's page lists its payload fields and an example: start from the tools index.
- Run your first workflow to chain tools together.