API reference
Your models
Models you trained, of every type: list, inspect, rename, tag and delete.
On this page
List your MPNN models (deprecated)
GET/api/v1/user-models/mpnn
API key or tokenDeprecated
Deprecated. Use GET /user-models?model_type=mpnn and GET /user-models/{model_id}. This route stops working after Fri, 15 Jan 2027 00:00:00 GMT.
Parameters
| Name | Type | Description |
|---|---|---|
model_name | string |
Example request
curl "https://api.cognichem.com/api/v1/user-models/mpnn" \
-H "X-Api-Key: $COGNICHEM_API_KEY"from cognichem_client import CogniChem
client = CogniChem.from_env()
result = client.inference.models.mpnn.user()
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. |
Delete one of your MPNN models (deprecated)
DELETE/api/v1/user-models/mpnn
API key or tokenDeprecated
Deprecated. Use DELETE /user-models/{model_id}. This route stops working after Fri, 15 Jan 2027 00:00:00 GMT.
Parameters
| Name | Type | Description |
|---|---|---|
model_namerequired | string |
Example request
curl -X DELETE "https://api.cognichem.com/api/v1/user-models/mpnn?model_name=MODEL_NAME" \
-H "X-Api-Key: $COGNICHEM_API_KEY"from cognichem_client import CogniChem
client = CogniChem.from_env()
result = client.inference.models.mpnn.delete("MODEL_NAME")
print(result)Python SDK pip install cognichem-client (1.1 or later). from_env() reads COGNICHEM_API_KEY.
Responses
Successful Response · application/json · MessageResponse
| Field | Type | Description |
|---|---|---|
messagerequired | string | The message content. |
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 your saved models
GET/api/v1/user-models
API key or token
List the models you trained, oldest first, with your model quota.
Each entry has the model_id that scoring jobs take and the model_type and name that inference takes, plus its description, tags and validation / test metrics (fold_metrics). quota counts your models against your plan's cap; failed models never count.
Parameters
| Name | Type | Description |
|---|---|---|
model_type | string | Only models of this type (for example Limits: |
include_failed | boolean | Also list your newest failed models (up to 100), whose training stopped without a model. Default: |
Example request
curl "https://api.cognichem.com/api/v1/user-models?model_type=mpnn" \
-H "X-Api-Key: $COGNICHEM_API_KEY"import os
import httpx
response = httpx.get(
"https://api.cognichem.com/api/v1/user-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 · UserModelsResponse
| Field | Type | Description |
|---|---|---|
models[]required | UserModelSummary[] | Your models, oldest first. |
models.classes_by_target[] | ((string | integer)[])[] | null | |
models.created_at | string | null | |
models.description | string | null | Your description. |
models.failure_reason | string | null | Why a failed model has no bundle ( |
models.fold_metrics | map<string, number> | Validation, cross-validation and test metrics such as |
models.model_idrequired | string | |
models.model_typerequired | string | |
models.namerequired | string | |
models.ready_at | string | null | When training finished. |
models.statusrequired | string | One of: |
models.tags[] | string[] | Your tags. |
models.target_names[] | string[] | null | |
models.task | string | null | |
models.unit | string | null | |
models.visibilityrequired | string | One of: |
quota | ModelQuota | null | Your model count and cap; |
quota.limitrequired | integer | Your tier's cap; training a new model past it fails before it starts. |
quota.tierrequired | integer | Your subscription tier. |
quota.usedrequired | integer | Models that count against the cap (training or ready; failed models never count). |
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. |
Get one of your saved models
GET/api/v1/user-models/{model_id}
API key or token
Get one of your models with its training settings, metrics and history.
Parameters
| Name | Type | Description |
|---|---|---|
model_idrequired | string | Limits: |
Example request
curl "https://api.cognichem.com/api/v1/user-models/mdl-01JABCDEFGHJKMNPQRSTVWXYZ0" \
-H "X-Api-Key: $COGNICHEM_API_KEY"import os
import httpx
response = httpx.get(
"https://api.cognichem.com/api/v1/user-models/mdl-01JABCDEFGHJKMNPQRSTVWXYZ0",
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 · SavedModelDetail
| Field | Type | Description |
|---|---|---|
classes_by_target[] | ((string | integer)[])[] | null | |
config | object | Training settings ( |
created_at | string | null | |
description | string | null | |
edited_at | string | null | Your last edit of name, description or tags. |
failed_at | string | null | When training failed. |
failure_message | string | null | The training job's message when the model failed. |
failure_reason | string | null | |
fold_metrics | map<string, number> | |
framework_versions | object | Library versions the model was trained with. |
history[] | object[] | Per-epoch training curve (downsampled); empty for families without one. |
job_id | string | null | The training job's |
metrics_summary | object | Validation and test metrics; keys depend on the model family. |
model_idrequired | string | |
model_typerequired | string | |
namerequired | string | |
ready_at | string | null | |
size_bytes | integer | Stored bundle size (0 until ready). Default: |
staterequired | string |
|
statusrequired | string | One of: |
tags[] | string[] | |
target_names[] | string[] | null | |
task | string | null | |
training_job | TrainingJobSummary | null | The training job, while it exists. |
training_job.finished_at | string | null | |
training_job.job_name | string | null | Your job name. |
training_job.process_idrequired | string | Job id for |
training_job.runtime_seconds | number | null | Billed runtime. |
training_job.started_at | string | null | |
training_job.status | string | null | Job status. |
training_job.status_message | string | null | The job's last message (the error when it failed). |
unit | string | null | |
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. |
Rename, describe or tag one of your saved models
PATCH/api/v1/user-models/{model_id}
API key or token
Change a model's name, description or tags; fields you leave out keep their values.
Inference selects your models by model_type and name, so after a rename pass the new name as model_name. Jobs and workflows that take model_id are unaffected.
Parameters
| Name | Type | Description |
|---|---|---|
model_idrequired | string | Limits: |
Request body
application/json · UpdateSavedModelRequest
| Field | Type | Description |
|---|---|---|
description | string | null | New description; Limits: |
name | string | null | New name, unique among your models of this Limits: |
tags[] | string[] | null | Replacement tags (duplicates ignoring case are dropped); Limits: |
Example request
curl -X PATCH "https://api.cognichem.com/api/v1/user-models/mdl-01JABCDEFGHJKMNPQRSTVWXYZ0" \
-H "X-Api-Key: $COGNICHEM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "aqsoldb-logs-v2"
}'import os
import httpx
response = httpx.patch(
"https://api.cognichem.com/api/v1/user-models/mdl-01JABCDEFGHJKMNPQRSTVWXYZ0",
headers={"X-Api-Key": os.environ["COGNICHEM_API_KEY"]},
json={"name": "aqsoldb-logs-v2"},
)
response.raise_for_status()
print(response.json())Uses httpx; the Python SDK has no method for this endpoint.
Responses
Successful Response · application/json · SavedModelDetail
| Field | Type | Description |
|---|---|---|
classes_by_target[] | ((string | integer)[])[] | null | |
config | object | Training settings ( |
created_at | string | null | |
description | string | null | |
edited_at | string | null | Your last edit of name, description or tags. |
failed_at | string | null | When training failed. |
failure_message | string | null | The training job's message when the model failed. |
failure_reason | string | null | |
fold_metrics | map<string, number> | |
framework_versions | object | Library versions the model was trained with. |
history[] | object[] | Per-epoch training curve (downsampled); empty for families without one. |
job_id | string | null | The training job's |
metrics_summary | object | Validation and test metrics; keys depend on the model family. |
model_idrequired | string | |
model_typerequired | string | |
namerequired | string | |
ready_at | string | null | |
size_bytes | integer | Stored bundle size (0 until ready). Default: |
staterequired | string |
|
statusrequired | string | One of: |
tags[] | string[] | |
target_names[] | string[] | null | |
task | string | null | |
training_job | TrainingJobSummary | null | The training job, while it exists. |
training_job.finished_at | string | null | |
training_job.job_name | string | null | Your job name. |
training_job.process_idrequired | string | Job id for |
training_job.runtime_seconds | number | null | Billed runtime. |
training_job.started_at | string | null | |
training_job.status | string | null | Job status. |
training_job.status_message | string | null | The job's last message (the error when it failed). |
unit | string | null | |
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 | You have no live model with that id. |
409 | You already have a model of this type by that name. |
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. |
Delete one of your saved models
DELETE/api/v1/user-models/{model_id}
API key or token
Delete one of your models. Its name and its slot in your model quota are free again at once.
Parameters
| Name | Type | Description |
|---|---|---|
model_idrequired | string | Limits: |
Example request
curl -X DELETE "https://api.cognichem.com/api/v1/user-models/mdl-01JABCDEFGHJKMNPQRSTVWXYZ0" \
-H "X-Api-Key: $COGNICHEM_API_KEY"import os
import httpx
response = httpx.delete(
"https://api.cognichem.com/api/v1/user-models/mdl-01JABCDEFGHJKMNPQRSTVWXYZ0",
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 · MessageResponse
| Field | Type | Description |
|---|---|---|
messagerequired | string | The message content. |
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. |