API reference
Public models
Catalog of organization-wide public models.
On this page
List public MPNN models (deprecated)
GET/api/v1/public-models/mpnn
API key or tokenDeprecated
Deprecated. Use GET /public-models?model_type=mpnn. This route stops working after Fri, 15 Jan 2027 00:00:00 GMT.
Example request
curl "https://api.cognichem.com/api/v1/public-models/mpnn" \
-H "X-Api-Key: $COGNICHEM_API_KEY"from cognichem_client import CogniChem
client = CogniChem.from_env()
result = client.inference.models.mpnn.public()
print(result)Python SDK pip install cognichem-client (1.1 or later). from_env() reads COGNICHEM_API_KEY.
Responses
Successful Response · application/json · GetMPNNModelsResponse
| Field | Type | Description |
|---|---|---|
model_info | object | null | A dictionary containing MPNN model information. |
model_names[] | string[] | null | A list of MPNN model names. |
models[] | SavedModelRef[] | null | The same models with their ids, for scoring jobs. |
models.classes_by_target[] | ((string | integer)[])[] | null | Class labels per target of a multiclass model (models trained since #976); a scoring job names one as |
models.created_at | string | null | When training started (your models only). |
models.model_idrequired | string |
|
models.model_typerequired | string | Model family ( |
models.namerequired | string | Display name; pass it as |
models.statusrequired | string |
One of: |
models.target_names[] | string[] | null | The model's targets, primary first; a scoring job may name another as |
models.task | string | null |
|
models.unit | string | null | Unit of the predicted value, when the model declares one. |
models.visibilityrequired | string |
One of: |
Errors are RFC 7807 problem details (application/problem+json) with status, title, detail, request_id, and a retryability hint (validation, auth, quota, conflict, upstream, timeout, or terminal). Handling errors
| Status | When |
|---|---|
400 | Invalid input or business rule violation. |
401 | Missing or invalid credentials. |
402 | Wallet cannot cover the Assistant turn hold. |
403 | Authenticated but not allowed to access the resource. |
404 | Resource not found or not owned by the user. |
409 | Conflict (e.g. idempotency key reuse with a different body). |
413 | Request body or workflow spec exceeds size caps. |
422 | Request body or query failed validation. |
429 | Rate limit exceeded. |
500 | Unexpected server error. |
503 | Dependency temporarily unavailable. |
List public models
GET/api/v1/public-models
API key or token
List the ready public models anyone can predict with, by type and name.
Parameters
| Name | Type | Description |
|---|---|---|
model_type | string | Only models of this type (for example Limits: |
Example request
curl "https://api.cognichem.com/api/v1/public-models?model_type=mpnn" \
-H "X-Api-Key: $COGNICHEM_API_KEY"import os
import httpx
response = httpx.get(
"https://api.cognichem.com/api/v1/public-models",
params={"model_type": "mpnn"},
headers={"X-Api-Key": os.environ["COGNICHEM_API_KEY"]},
)
response.raise_for_status()
print(response.json())Uses httpx; the Python SDK has no method for this endpoint.
Responses
Successful Response · application/json · SavedModelsResponse
| Field | Type | Description |
|---|---|---|
models[]required | SavedModelRef[] | Your models oldest first, or public models by name. |
models.classes_by_target[] | ((string | integer)[])[] | null | Class labels per target of a multiclass model (models trained since #976); a scoring job names one as |
models.created_at | string | null | When training started (your models only). |
models.model_idrequired | string |
|
models.model_typerequired | string | Model family ( |
models.namerequired | string | Display name; pass it as |
models.statusrequired | string |
One of: |
models.target_names[] | string[] | null | The model's targets, primary first; a scoring job may name another as |
models.task | string | null |
|
models.unit | string | null | Unit of the predicted value, when the model declares one. |
models.visibilityrequired | string |
One of: |
Errors are RFC 7807 problem details (application/problem+json) with status, title, detail, request_id, and a retryability hint (validation, auth, quota, conflict, upstream, timeout, or terminal). Handling errors
| Status | When |
|---|---|
400 | Invalid input or business rule violation. |
401 | Missing or invalid credentials. |
402 | Wallet cannot cover the Assistant turn hold. |
403 | Authenticated but not allowed to access the resource. |
404 | Resource not found or not owned by the user. |
409 | Conflict (e.g. idempotency key reuse with a different body). |
413 | Request body or workflow spec exceeds size caps. |
422 | Request body or query failed validation. |
429 | Rate limit exceeded. |
500 | Unexpected server error. |
503 | Dependency temporarily unavailable. |
Retire a public model you published (administrators)
POST/api/v1/public-models/{model_id}/retire
API key or token
Retire a public model that was published from one of your models. Administrators only.
A retired model leaves GET /public-models and name lookups, but jobs, workflows and clients that use its model_id keep running. It is not deleted.
Parameters
| Name | Type | Description |
|---|---|---|
model_idrequired | string | Limits: |
| Name | Type | Description |
|---|---|---|
Idempotency-Key | string | A unique key (a UUID) for this request. Retrying with the same key and body returns the first result instead of repeating the work; the same key with a different body is a 409. |
Request body
application/json · RetirePublicModelRequest
| Field | Type | Description |
|---|---|---|
reasonrequired | string | Why it is retired; kept in the administrator audit log. Limits: |
Example request
curl -X POST "https://api.cognichem.com/api/v1/public-models/mdl-01JABCDEFGHJKMNPQRSTVWXYZ0/retire" \
-H "X-Api-Key: $COGNICHEM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"reason": "Replaced by a retrained model."
}'import os
import uuid
import httpx
response = httpx.post(
"https://api.cognichem.com/api/v1/public-models/mdl-01JABCDEFGHJKMNPQRSTVWXYZ0/retire",
headers={"X-Api-Key": os.environ["COGNICHEM_API_KEY"], "Idempotency-Key": str(uuid.uuid4())},
json={"reason": "Replaced by a retrained model."},
)
response.raise_for_status()
print(response.json())Uses httpx; the Python SDK has no method for this endpoint.
Responses
Successful Response · application/json · RetirePublicModelResponse
| Field | Type | Description |
|---|---|---|
model_idrequired | string | The public model. |
model_typerequired | string | |
namerequired | string | |
retired_atrequired | string | When it was retired. |
Errors are RFC 7807 problem details (application/problem+json) with status, title, detail, request_id, and a retryability hint (validation, auth, quota, conflict, upstream, timeout, or terminal). Handling errors
| Status | When |
|---|---|
400 | Invalid input or business rule violation. |
401 | Missing or invalid credentials. |
402 | Wallet cannot cover the Assistant turn hold. |
403 | Only administrators can retire public models, and only ones published from their own models. Needs a signed-in session with two-step sign-in ( |
404 | No listed public model has that id. |
409 | The Idempotency-Key is in use or reused. |
413 | Request body or workflow spec exceeds size caps. |
422 | Request body or query failed validation. |
429 | Rate limit exceeded. |
500 | Unexpected server error. |
503 | Dependency temporarily unavailable. |