Download OpenAPI specification:Download
The Intelligence Foundry REST API. Please see https://docs.crusoecloud.com/ for more details.
Creates a fine-tuning job which begins the process of creating a new model from a given dataset.
Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.
required | string or string The name of the model to fine-tune. You can select one of the supported models. |
| training_file required | string The ID of an uploaded file that contains training data. See upload file for how to upload a file. Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose The contents of the file should differ depending on if the model uses the chat, completions format, or if the fine-tuning method uses the preference format. See the fine-tuning guide for more details. |
| suffix | string or null [ 1 .. 64 ] characters ^[a-zA-Z0-9][a-zA-Z0-9-]*$ A string of up to 64 characters that will be added to your fine-tuned model name. For example, a |
| validation_file | string or null The ID of an uploaded file that contains validation data. If you provide this file, the data is used to generate validation metrics periodically during fine-tuning. These metrics can be viewed in the fine-tuning results file. The same data should not be present in both train and validation files. Your dataset must be formatted as a JSONL file. You must upload your file with the purpose See the fine-tuning guide for more details. |
| seed | integer or null [ 0 .. 2147483647 ] The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases. If a seed is not specified, one will be generated for you. |
object (FineTuneMethod) The method used for fine-tuning. Only | |
(object or null) or (object or null) (Metadata) Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. |
{- "model": "gpt-4o-mini",
- "training_file": "file-abc123",
- "suffix": "string",
- "validation_file": "file-abc123",
- "seed": 42,
- "method": {
- "type": "supervised",
- "supervised": {
- "hyperparameters": {
- "batch_size": "auto",
- "learning_rate_multiplier": "auto",
- "n_epochs": "auto",
- "lora_variant": "lora",
- "expert_lora_sharing": "per_expert",
- "quant_lora_method": "weight_lora",
- "lora_rank": 2,
- "lora_alpha": 1,
- "lora_dropout": 1,
- "early_stopping_patience": 1,
- "warmup_ratio": 1,
- "learning_rate": "auto",
- "weight_decay": 0,
- "top_k_gating": 1,
- "checkpoint_steps": 20,
- "eval_steps_per_epoch": 1,
- "overlong_row_behavior": "error",
- "lr_scheduler": "cosine"
}
}
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}
}{- "id": "string",
- "created_at": 0,
- "error": {
- "code": "string",
- "message": "string",
- "param": "string"
}, - "fine_tuned_model": "string",
- "finished_at": 0,
- "model": "string",
- "object": "fine_tuning.job",
- "organization_id": "string",
- "result_files": [
- "file-abc123"
], - "status": "validating_files",
- "trained_tokens": 0,
- "training_file": "string",
- "validation_file": "string",
- "seed": 0,
- "estimated_finish": 0,
- "method": {
- "type": "supervised",
- "supervised": {
- "hyperparameters": {
- "batch_size": "auto",
- "learning_rate_multiplier": "auto",
- "n_epochs": "auto",
- "lora_variant": "lora",
- "expert_lora_sharing": "per_expert",
- "quant_lora_method": "weight_lora",
- "lora_rank": 2,
- "lora_alpha": 1,
- "lora_dropout": 1,
- "early_stopping_patience": 1,
- "warmup_ratio": 1,
- "learning_rate": "auto",
- "weight_decay": 0,
- "top_k_gating": 1,
- "checkpoint_steps": 20,
- "eval_steps_per_epoch": 1,
- "overlong_row_behavior": "error",
- "lr_scheduler": "cosine"
}
}
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "job_training_config": null
}| model | Array of strings Filter to jobs for these base model registry IDs. |
| suffix | Array of strings Filter to jobs with these suffixes. |
| status | Array of strings Items Enum: "validating_files" "queued" "running" "succeeded" "failed" "cancelled" "paused" Filter to jobs in these statuses. |
{- "data": [
- {
- "id": "string",
- "created_at": 0,
- "error": {
- "code": "string",
- "message": "string",
- "param": "string"
}, - "fine_tuned_model": "string",
- "finished_at": 0,
- "model": "string",
- "object": "fine_tuning.job",
- "organization_id": "string",
- "result_files": [
- "file-abc123"
], - "status": "validating_files",
- "trained_tokens": 0,
- "training_file": "string",
- "validation_file": "string",
- "seed": 0,
- "estimated_finish": 0,
- "method": {
- "type": "supervised",
- "supervised": {
- "hyperparameters": {
- "batch_size": "auto",
- "learning_rate_multiplier": "auto",
- "n_epochs": "auto",
- "lora_variant": "lora",
- "expert_lora_sharing": "per_expert",
- "quant_lora_method": "weight_lora",
- "lora_rank": 2,
- "lora_alpha": 1,
- "lora_dropout": 1,
- "early_stopping_patience": 1,
- "warmup_ratio": 1,
- "learning_rate": "auto",
- "weight_decay": 0,
- "top_k_gating": 1,
- "checkpoint_steps": 20,
- "eval_steps_per_epoch": 1,
- "overlong_row_behavior": "error",
- "lr_scheduler": "cosine"
}
}
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "job_training_config": null
}
], - "has_more": true,
- "object": "list"
}Get info about a fine-tuning job.
| fine_tuning_job_id required | string The ID of the fine-tuning job. |
{- "id": "string",
- "created_at": 0,
- "error": {
- "code": "string",
- "message": "string",
- "param": "string"
}, - "fine_tuned_model": "string",
- "finished_at": 0,
- "model": "string",
- "object": "fine_tuning.job",
- "organization_id": "string",
- "result_files": [
- "file-abc123"
], - "status": "validating_files",
- "trained_tokens": 0,
- "training_file": "string",
- "validation_file": "string",
- "seed": 0,
- "estimated_finish": 0,
- "method": {
- "type": "supervised",
- "supervised": {
- "hyperparameters": {
- "batch_size": "auto",
- "learning_rate_multiplier": "auto",
- "n_epochs": "auto",
- "lora_variant": "lora",
- "expert_lora_sharing": "per_expert",
- "quant_lora_method": "weight_lora",
- "lora_rank": 2,
- "lora_alpha": 1,
- "lora_dropout": 1,
- "early_stopping_patience": 1,
- "warmup_ratio": 1,
- "learning_rate": "auto",
- "weight_decay": 0,
- "top_k_gating": 1,
- "checkpoint_steps": 20,
- "eval_steps_per_epoch": 1,
- "overlong_row_behavior": "error",
- "lr_scheduler": "cosine"
}
}
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "job_training_config": null
}| fine_tuning_job_id required | string The ID of the fine-tuning job to get checkpoints for. |
| after | string Identifier for the last checkpoint ID from the previous pagination request. |
| limit | integer Default: 10 Number of checkpoints to retrieve. |
{- "data": [
- {
- "id": "string",
- "created_at": 0,
- "fine_tuned_model_checkpoint": "string",
- "step_number": 0,
- "metrics": {
- "step": 0,
- "train_loss": 0,
- "train_mean_token_accuracy": 0,
- "valid_loss": 0,
- "valid_mean_token_accuracy": 0,
- "full_valid_loss": 0,
- "full_valid_mean_token_accuracy": 0
}, - "fine_tuning_job_id": "string",
- "object": "fine_tuning.job.checkpoint",
- "fine_tuned_model_id": null
}
], - "object": "list",
- "first_id": "string",
- "last_id": "string",
- "has_more": true
}| fine_tuning_job_id required | string The ID of the fine-tuning job to cancel. |
{- "id": "string",
- "created_at": 0,
- "error": {
- "code": "string",
- "message": "string",
- "param": "string"
}, - "fine_tuned_model": "string",
- "finished_at": 0,
- "model": "string",
- "object": "fine_tuning.job",
- "organization_id": "string",
- "result_files": [
- "file-abc123"
], - "status": "validating_files",
- "trained_tokens": 0,
- "training_file": "string",
- "validation_file": "string",
- "seed": 0,
- "estimated_finish": 0,
- "method": {
- "type": "supervised",
- "supervised": {
- "hyperparameters": {
- "batch_size": "auto",
- "learning_rate_multiplier": "auto",
- "n_epochs": "auto",
- "lora_variant": "lora",
- "expert_lora_sharing": "per_expert",
- "quant_lora_method": "weight_lora",
- "lora_rank": 2,
- "lora_alpha": 1,
- "lora_dropout": 1,
- "early_stopping_patience": 1,
- "warmup_ratio": 1,
- "learning_rate": "auto",
- "weight_decay": 0,
- "top_k_gating": 1,
- "checkpoint_steps": 20,
- "eval_steps_per_epoch": 1,
- "overlong_row_behavior": "error",
- "lr_scheduler": "cosine"
}
}
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "job_training_config": null
}| fine_tuning_job_id required | string The ID of the fine-tuning job to get events for. |
| after | string Identifier for the last event from the previous pagination request. |
| limit | integer Default: 20 Number of events to retrieve. |
{- "data": [
- {
- "object": "fine_tuning.job.event",
- "id": "string",
- "created_at": 0,
- "level": "info",
- "message": "string",
- "type": "message",
- "data": { }
}
], - "object": "list",
- "has_more": true
}Get time-series training metrics for a fine-tuning job.
| fine_tuning_job_id required | string The ID of the fine-tuning job to get metrics for. |
| metric_names | Array of strings Items Enum: "ev_loss" "ev_eval_loss" "ev_current_step" "ev_total_steps" "ev_learning_rate" "ev_grad_norm" "ev_num_input_tokens_seen" "ev_eval_samples_per_second" "ev_eval_steps_per_second" "ev_estimated_finish" "ev_train_loss" "ev_train_runtime" "ev_train_samples_per_second" "ev_train_steps_per_second" "ev_train_tokens_per_second" "ev_total_flos" Filter to specific metric names. |
| cursor | string Epoch timestamp cursor for pagination. |
| step | string Step duration for aggregation (e.g. 1m, 30s). |
| x_axis | string Enum: "timestamp" "step_count" X-axis type for returned data points (default timestamp). |
{- "object": "fine_tuning.job.metrics",
- "fine_tuning_job_id": "string",
- "x_axis": "timestamp",
- "metrics": [
- {
- "metric_name": "ev_loss",
- "data": [
- {
- "x": 0,
- "value": 0
}
]
}
]
}Estimate the price of a fine-tuning job without creating it. Accepts the same request body as job creation and prices it against the model's published training rate. This is a pre-flight estimate derived from the raw training-file size, not a quote; actual billed usage is based on real trained-token counts and may differ.
required | string or string The name of the model to fine-tune. You can select one of the supported models. |
| training_file required | string The ID of an uploaded file that contains training data. See upload file for how to upload a file. Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose The contents of the file should differ depending on if the model uses the chat, completions format, or if the fine-tuning method uses the preference format. See the fine-tuning guide for more details. |
| suffix | string or null [ 1 .. 64 ] characters ^[a-zA-Z0-9][a-zA-Z0-9-]*$ A string of up to 64 characters that will be added to your fine-tuned model name. For example, a |
| validation_file | string or null The ID of an uploaded file that contains validation data. If you provide this file, the data is used to generate validation metrics periodically during fine-tuning. These metrics can be viewed in the fine-tuning results file. The same data should not be present in both train and validation files. Your dataset must be formatted as a JSONL file. You must upload your file with the purpose See the fine-tuning guide for more details. |
| seed | integer or null [ 0 .. 2147483647 ] The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases. If a seed is not specified, one will be generated for you. |
object (FineTuneMethod) The method used for fine-tuning. Only | |
(object or null) or (object or null) (Metadata) Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. |
{- "model": "gpt-4o-mini",
- "training_file": "file-abc123",
- "suffix": "string",
- "validation_file": "file-abc123",
- "seed": 42,
- "method": {
- "type": "supervised",
- "supervised": {
- "hyperparameters": {
- "batch_size": "auto",
- "learning_rate_multiplier": "auto",
- "n_epochs": "auto",
- "lora_variant": "lora",
- "expert_lora_sharing": "per_expert",
- "quant_lora_method": "weight_lora",
- "lora_rank": 2,
- "lora_alpha": 1,
- "lora_dropout": 1,
- "early_stopping_patience": 1,
- "warmup_ratio": 1,
- "learning_rate": "auto",
- "weight_decay": 0,
- "top_k_gating": 1,
- "checkpoint_steps": 20,
- "eval_steps_per_epoch": 1,
- "overlong_row_behavior": "error",
- "lr_scheduler": "cosine"
}
}
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}
}{- "object": "fine_tuning.job.price_estimate",
- "estimated_price": "7.86",
- "currency": "usd"
}| purpose | string Only return files with the given purpose. |
| limit | integer Default: 10000 A limit on the number of objects to be returned. Limit can range between 1 and 10,000, and the default is 10,000. |
| order | string Default: "desc" Enum: "asc" "desc" Sort order by the |
| after | string A cursor for use in pagination. |
{- "object": "list",
- "data": [
- {
- "id": "string",
- "bytes": 0,
- "created_at": 0,
- "expires_at": 0,
- "filename": "string",
- "object": "file",
- "purpose": "assistants",
- "status": "uploaded",
- "status_details": "string",
- "is_cmek_encrypted": false
}
], - "first_id": "file-abc123",
- "last_id": "file-abc456",
- "has_more": false
}Upload a file that can be used across various endpoints. Individual files can be up to 512 MB, and each project can store up to 2.5 TB of files in total. There is no organization-wide storage limit. Uploads to this endpoint are rate-limited to 1,000 requests per minute per authenticated user.
.jsonl files. The input also has
certain required formats for fine-tuning
chat or
completions models..jsonl files up to 200 MB in size. The input
also has a specific required
format.file_search ingestion, upload files here first. If
you need to attach multiple uploaded files to the same vector store, use
/vector_stores/{vector_store_id}/file_batches
instead of attaching them one by one. Vector store attachment has separate
limits from file upload, including 2,000 attached files per minute per
organization.Please contact us if you need to increase these storage limits.
| file required | string <binary> The File object (not file name) to be uploaded. |
| purpose required | string Enum: "assistants" "batch" "fine-tune" "vision" "user_data" "evals" The intended purpose of the uploaded file. One of:
|
object (File expiration policy) The expiration policy for a file. By default, files with |
{- "id": "string",
- "bytes": 0,
- "created_at": 0,
- "expires_at": 0,
- "filename": "string",
- "object": "file",
- "purpose": "assistants",
- "status": "uploaded",
- "status_details": "string",
- "is_cmek_encrypted": false
}| file_id required | string The ID of the file to use for this request. |
{- "id": "string",
- "bytes": 0,
- "created_at": 0,
- "expires_at": 0,
- "filename": "string",
- "object": "file",
- "purpose": "assistants",
- "status": "uploaded",
- "status_details": "string",
- "is_cmek_encrypted": false
}Creates an intermediate Upload object that you can add Parts to. Currently, an Upload can accept at most 8 GB in total and expires after an hour after you create it.
Once you complete the Upload, we will create a File object that contains all the parts you uploaded. This File is usable in the rest of our platform as a regular File object.
For certain purpose values, the correct mime_type must be specified.
Please refer to documentation for the
supported MIME types for your use case.
For guidance on the proper filename extensions for each purpose, please follow the documentation on creating a File.
Returns the Upload object with status pending.
| filename required | string The name of the file to upload. |
| purpose required | string Enum: "assistants" "batch" "fine-tune" "vision" The intended purpose of the uploaded file. See the documentation on File purposes. |
| bytes required | integer The number of bytes in the file you are uploading. |
| mime_type required | string The MIME type of the file. This must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision. |
object (File expiration policy) The expiration policy for a file. By default, files with |
{- "filename": "string",
- "purpose": "assistants",
- "bytes": 0,
- "mime_type": "string",
- "expires_after": {
- "anchor": "created_at",
- "seconds": 3600
}
}{- "id": "string",
- "created_at": 0,
- "filename": "string",
- "bytes": 0,
- "purpose": "string",
- "status": "pending",
- "expires_at": 0,
- "object": "upload",
- "file": {
- "id": "string",
- "bytes": 0,
- "created_at": 0,
- "expires_at": 0,
- "filename": "string",
- "object": "file",
- "purpose": "assistants",
- "status": "uploaded",
- "status_details": "string",
- "is_cmek_encrypted": false
}
}List the project's upload sessions. Defaults to active (pending) sessions;
pass status to filter (terminal sessions are retained for a bounded
window before being garbage-collected).
| status | string Enum: "pending" "completed" "cancelled" "expired" Only return uploads with the given status. |
| limit | integer Default: 100 A limit on the number of uploads returned. |
| order | string Default: "desc" Enum: "asc" "desc" Sort order by the created_at timestamp. |
| after | string A cursor for pagination (an upload ID). |
{- "object": "list",
- "data": [
- {
- "id": "string",
- "created_at": 0,
- "filename": "string",
- "bytes": 0,
- "purpose": "string",
- "status": "pending",
- "expires_at": 0,
- "object": "upload",
- "file": {
- "id": "string",
- "bytes": 0,
- "created_at": 0,
- "expires_at": 0,
- "filename": "string",
- "object": "file",
- "purpose": "assistants",
- "status": "uploaded",
- "status_details": "string",
- "is_cmek_encrypted": false
}
}
], - "first_id": "string",
- "last_id": "string",
- "has_more": true
}Adds a Part to an Upload object. A Part represents a chunk of bytes from the file you are trying to upload.
Each Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB.
It is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you complete the Upload.
| upload_id required | string The ID of the Upload. |
| data required | string <binary> The chunk of bytes for this Part. |
{- "id": "string",
- "created_at": 0,
- "upload_id": "string",
- "object": "upload.part"
}List the parts received for an in-progress upload. Returns an empty list once the upload has completed (parts do not outlive completion).
| upload_id required | string The ID of the Upload whose parts to list. |
{- "object": "list",
- "data": [
- {
- "id": "string",
- "created_at": 0,
- "upload_id": "string",
- "object": "upload.part"
}
], - "first_id": "string",
- "last_id": "string",
- "has_more": true
}Completes the Upload.
Within the returned Upload object, there is a nested File object that is ready to use in the rest of the platform.
You can specify the order of the Parts by passing in an ordered list of the Part IDs.
The number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.
Returns the Upload object with status completed, including an additional file property containing the created usable File object.
| upload_id required | string The ID of the Upload. |
| part_ids required | Array of strings The ordered list of Part IDs. |
| md5 | string The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect. |
{- "part_ids": [
- "string"
], - "md5": "string"
}{- "id": "string",
- "created_at": 0,
- "filename": "string",
- "bytes": 0,
- "purpose": "string",
- "status": "pending",
- "expires_at": 0,
- "object": "upload",
- "file": {
- "id": "string",
- "bytes": 0,
- "created_at": 0,
- "expires_at": 0,
- "filename": "string",
- "object": "file",
- "purpose": "assistants",
- "status": "uploaded",
- "status_details": "string",
- "is_cmek_encrypted": false
}
}Cancels the Upload. No Parts may be added after an Upload is cancelled.
Returns the Upload object with status cancelled.
| upload_id required | string The ID of the Upload. |
{- "id": "string",
- "created_at": 0,
- "filename": "string",
- "bytes": 0,
- "purpose": "string",
- "status": "pending",
- "expires_at": 0,
- "object": "upload",
- "file": {
- "id": "string",
- "bytes": 0,
- "created_at": 0,
- "expires_at": 0,
- "filename": "string",
- "object": "file",
- "purpose": "assistants",
- "status": "uploaded",
- "status_details": "string",
- "is_cmek_encrypted": false
}
}Retrieve an upload session and its current status. The poll surface for asynchronous assembly and for resuming an interrupted upload.
| upload_id required | string The ID of the Upload to retrieve. |
{- "id": "string",
- "created_at": 0,
- "filename": "string",
- "bytes": 0,
- "purpose": "string",
- "status": "pending",
- "expires_at": 0,
- "object": "upload",
- "file": {
- "id": "string",
- "bytes": 0,
- "created_at": 0,
- "expires_at": 0,
- "filename": "string",
- "object": "file",
- "purpose": "assistants",
- "status": "uploaded",
- "status_details": "string",
- "is_cmek_encrypted": false
}
}| after | string A cursor for use in pagination. |
| limit | integer Default: 20 A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
{- "data": [
- {
- "id": "string",
- "object": "batch",
- "endpoint": "string",
- "model": "string",
- "errors": {
- "object": "string",
- "data": [
- {
- "code": "string",
- "message": "string",
- "param": "string",
- "line": 0
}
]
}, - "input_file_id": "string",
- "completion_window": "string",
- "status": "validating",
- "output_file_id": "string",
- "error_file_id": "string",
- "created_at": 0,
- "in_progress_at": 0,
- "expires_at": 0,
- "finalizing_at": 0,
- "completed_at": 0,
- "failed_at": 0,
- "expired_at": 0,
- "cancelling_at": 0,
- "cancelled_at": 0,
- "request_counts": {
- "total": 0,
- "completed": 0,
- "failed": 0
}, - "usage": {
- "input_tokens": 0,
- "input_tokens_details": {
- "cached_tokens": 0
}, - "output_tokens": 0,
- "output_tokens_details": {
- "reasoning_tokens": 0
}, - "total_tokens": 0
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}
}
], - "first_id": "batch_abc123",
- "last_id": "batch_abc456",
- "has_more": true,
- "object": "list"
}| input_file_id required | string The ID of an uploaded file that contains requests for the new batch. The file must be a JSONL file uploaded with the purpose |
| endpoint required | string Value: "/v1/chat/completions" The endpoint to be used for all requests in the batch. Currently only |
| completion_window required | string Value: "24h" The time frame within which the batch should be processed. Currently only |
(object or null) or (object or null) (Metadata) Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. | |
| model required | string The model to run every request in the batch against. The model must be batch-available. Per-line request bodies must not contain a |
{- "input_file_id": "string",
- "endpoint": "/v1/chat/completions",
- "completion_window": "24h",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "model": "model-qwen-qwen3-0-6b-e78b5b5f"
}{- "id": "string",
- "object": "batch",
- "endpoint": "string",
- "model": "string",
- "errors": {
- "object": "string",
- "data": [
- {
- "code": "string",
- "message": "string",
- "param": "string",
- "line": 0
}
]
}, - "input_file_id": "string",
- "completion_window": "string",
- "status": "validating",
- "output_file_id": "string",
- "error_file_id": "string",
- "created_at": 0,
- "in_progress_at": 0,
- "expires_at": 0,
- "finalizing_at": 0,
- "completed_at": 0,
- "failed_at": 0,
- "expired_at": 0,
- "cancelling_at": 0,
- "cancelled_at": 0,
- "request_counts": {
- "total": 0,
- "completed": 0,
- "failed": 0
}, - "usage": {
- "input_tokens": 0,
- "input_tokens_details": {
- "cached_tokens": 0
}, - "output_tokens": 0,
- "output_tokens_details": {
- "reasoning_tokens": 0
}, - "total_tokens": 0
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}
}| batch_id required | string The ID of the batch to retrieve. |
{- "id": "string",
- "object": "batch",
- "endpoint": "string",
- "model": "string",
- "errors": {
- "object": "string",
- "data": [
- {
- "code": "string",
- "message": "string",
- "param": "string",
- "line": 0
}
]
}, - "input_file_id": "string",
- "completion_window": "string",
- "status": "validating",
- "output_file_id": "string",
- "error_file_id": "string",
- "created_at": 0,
- "in_progress_at": 0,
- "expires_at": 0,
- "finalizing_at": 0,
- "completed_at": 0,
- "failed_at": 0,
- "expired_at": 0,
- "cancelling_at": 0,
- "cancelled_at": 0,
- "request_counts": {
- "total": 0,
- "completed": 0,
- "failed": 0
}, - "usage": {
- "input_tokens": 0,
- "input_tokens_details": {
- "cached_tokens": 0
}, - "output_tokens": 0,
- "output_tokens_details": {
- "reasoning_tokens": 0
}, - "total_tokens": 0
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}
}Cancels an in-progress batch. The batch will be in status cancelling for up to 10 minutes, before changing to cancelled, where it will have partial results (if any) available in the output file.
| batch_id required | string The ID of the batch to cancel. |
{- "id": "string",
- "object": "batch",
- "endpoint": "string",
- "model": "string",
- "errors": {
- "object": "string",
- "data": [
- {
- "code": "string",
- "message": "string",
- "param": "string",
- "line": 0
}
]
}, - "input_file_id": "string",
- "completion_window": "string",
- "status": "validating",
- "output_file_id": "string",
- "error_file_id": "string",
- "created_at": 0,
- "in_progress_at": 0,
- "expires_at": 0,
- "finalizing_at": 0,
- "completed_at": 0,
- "failed_at": 0,
- "expired_at": 0,
- "cancelling_at": 0,
- "cancelled_at": 0,
- "request_counts": {
- "total": 0,
- "completed": 0,
- "failed": 0
}, - "usage": {
- "input_tokens": 0,
- "input_tokens_details": {
- "cached_tokens": 0
}, - "output_tokens": 0,
- "output_tokens_details": {
- "reasoning_tokens": 0
}, - "total_tokens": 0
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}
}Lists the currently available models, and provides basic information about each one such as the owner and availability. All models the project can access are returned.
| model_type | string Enum: "base_model" "adapter" Filter models by type. Use base_model to exclude fine-tuned adapters, or adapter to return only them. Omit to return both. |
{- "object": "list",
- "data": [
- {
- "id": "admin-model-abc123",
- "object": "model",
- "owned_by": "org-123",
- "model_source": "huggingface",
- "model_name": "meta-llama/Llama-2-7b-hf",
- "model_revision": "main",
- "globally_available": false,
- "project_ids": [
- "proj-123"
], - "inference_available": true,
- "fine_tuning_available": false,
- "batch_available": false,
- "model_type": "base_model",
- "base_model_id": "model-abc123",
- "created": 1700000000
}
]
}Retrieves a model instance, providing basic information about the model such as the owner and availability.
| model required | string The encoded ID of the model (returned in the |
{- "id": "admin-model-abc123",
- "object": "model",
- "owned_by": "org-123",
- "model_source": "huggingface",
- "model_name": "meta-llama/Llama-2-7b-hf",
- "model_revision": "main",
- "globally_available": false,
- "project_ids": [
- "proj-123"
], - "inference_available": true,
- "fine_tuning_available": false,
- "batch_available": false,
- "model_type": "base_model",
- "base_model_id": "model-abc123",
- "created": 1700000000
}Delete a fine-tuned model owned by the caller's project. Refuses deletion of globally available models, models not solely owned by the caller's project, or models referenced by any non-terminal fine-tuning job in the project.
| model required | string The encoded ID of the model (returned in the |
{- "id": "string",
- "object": "model",
- "deleted": true
}Lists the currently available models without requiring authentication. All available models are returned.
{- "object": "list",
- "data": [
- {
- "id": "admin-model-abc123",
- "object": "model",
- "owned_by": "org-123",
- "model_source": "huggingface",
- "model_name": "meta-llama/Llama-2-7b-hf",
- "model_revision": "main",
- "globally_available": false,
- "project_ids": [
- "proj-123"
], - "inference_available": true,
- "fine_tuning_available": false,
- "batch_available": false,
- "model_type": "base_model",
- "base_model_id": "model-abc123",
- "created": 1700000000
}
]
}