API Documentation
Overview
Python SDK Reference
End to End example
List custom tools
Get a custom tool
Create a custom tool
Update a custom tool
Delete a custom tool
Create a source upload
Build a custom tool
List build logs
Cancel a custom tool build
Run a custom tool
Publish a custom tool version
List custom tool versions
Submit Finetuning Jobs
/api/finetuneThe POST API endpoint /finetune trains a model with a finetuning tool. The request body is the same as /submit-job's, except the tool is named by model instead of type. Authentication, validation, the response and every error are the same as /submit-job. Submit finetuning tools here, and batches of them with /finetune-batch: /submit-job and /submit-batch may refuse them with a 400 whose code is use_finetune_endpoint.
Parameters:
jobName
(string, required)
Name for the training job, exactly as on /submit-job.
model
(string, required)
The finetuning tool to run, for example "chemprop-finetune". GET /tools marks these tools with "finetune": true.
settings
(object, required)
The tool's settings, exactly as on /submit-job. Fetch the schema from GET /tools/{name}/schema.
settings.parentModelId
(string, optional)
Train the next version of an existing model: that model's id (the "id" from GET /finetuned-models). Most finetuning tools accept it; one that does not refuses it as an unknown setting. The model must be one you can access and trained with the same tool, or the job is refused with a 400.
projectTag, ...
(optional)
Every other field /submit-job accepts is accepted here with the same meaning.
Finetune-specific 400 responses:
Checked in this order, each answered as JSON { "error": "...", "code": "..." }. Any other 400 is exactly what /submit-job would answer: plain text or JSON, so parse the body before reading it.
model_required
The body has no "model".
type_model_mismatch
"type" was also sent and differs from "model". Send only "model".
not_a_finetune_tool
"model" is not a finetuning tool. Submit it with POST /submit-job instead.
HTTP Response Status Codes
| Status code | Description |
|---|---|
| 200 | Job successfully submitted |
| 400 | Bad request |
| 403 | Forbidden - organization or team budget exceeded |
| 500 | Internal server error |
1import requests
2
3api_key = "***************"
4headers = {'x-api-key': api_key}
5base_url = "https://app.tamarind.bio/api/"
6
7# Same body as /submit-job, with the tool in "model" instead of "type".
8params = {
9 "jobName": "my-solubility-model",
10 "model": "chemprop-finetune",
11 "settings": {
12 "task": "regression",
13 "csvFile": "solubility.csv", # uploaded with PUT /upload/{filename}
14 "smilesColumn": "smiles",
15 "propertyColumn": "logS"
16 }
17}
18response = requests.post(base_url + "finetune", headers=headers, json=params)
19if response.ok:
20 print(response.text) # "my-solubility-model submitted to queue."
21else:
22 # A 400 is plain text OR JSON. The finetune refusals are JSON with a "code".
23 try:
24 print(response.json())
25 except ValueError:
26 print(response.text)