Developer APIOverview

Developer API

The Biosimulant Developer API runs versioned Hub labs as durable managed jobs. It is available through the same MIT-licensed biosimulant Python distribution used for local simulation.

from biosimulant import Client
 
client = Client()  # reads BIOSIMULANT_API_KEY
result = client.run(
    "demi/microbiology-hello-world-growth@1.0.0",
    inputs={"initial_cells": 10, "available_food": 80},
    timeout=300,
)

Local versus managed execution

BioWorld.run() stays local, open source, and free. Client and AsyncClient are explicit managed-cloud interfaces. They submit to https://api.biosimulant.com/v1; no local call silently moves to hosted infrastructure. To resolve a pinned Hub Lab into a local world instead, use HubComposition.

The two modes share the same runtime, the same package refs, and the same results contract. What differs is where the work runs and what the platform manages for you:

Local: BioWorld.run()Managed: Client / AsyncClient
Where it runsYour machine or CIapi.biosimulant.com/v1
Entry pointworld.run(duration=…), run_package(…), CLIclient.run(ref, inputs=…)
Installpip install biosimulantSame package, plus an API key
Licensing & costMIT, freePrepaid credits
ComputeYour local CPU/GPUManaged CPU/GPU profiles
DurabilityEnds with your processDurable server job, survives client timeouts
Provenance & artifactsYou persist themAttached to every run automatically
DeliverySynchronous returnPoll a run handle or receive webhooks
Best forDevelopment, tests, offline work, CILong or GPU-heavy runs, shared results, automation

The same hello-world lab, run each way:

# Runs on your machine. MIT, free, offline.
# labs run pulls or reuses the ref, then runs it locally.
biosimulant labs run demi/microbiology-hello-world-growth@1.0.0 \
  --parameters-file inputs.json \
  --results-file results.json

Cloud runs are always durable and asynchronous on the server:

  • client.runs.create(...) returns a run handle immediately.
  • client.run(...) is a convenience that blocks the calling thread while polling.
  • await AsyncClient().run(...) waits without blocking the event loop.
  • A client-side timeout leaves the server run active and returns its handle on RunTimeout.

The first release executes accessible, versioned Hub labs. Arbitrary BioWorld serialization and private local-lab upload through the SDK are not part of this release.

Start here

  1. Create a scoped API key and complete the quickstart.
  2. Learn the durable run lifecycle.
  3. Read the reference and data contract.
  4. Choose from the tested Python patterns.
  5. Use the REST reference for direct HTTP integration.
  6. See the supported Python API surface for the complete public import inventory.