Download OpenAPI specification:Download
The Intelligence Foundry REST API. Please see https://docs.crusoecloud.com/ for more details.
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",
- "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",
- "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",
- "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"
}| 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",
- "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",
- "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 pause. |
{- "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",
- "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 resume. |
{- "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",
- "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
}
]
}
]
}| 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
}| 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
}| 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"
}
}| 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.
{- "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
}
]
}