POST
/
models
curl --request POST \
  --url https://app.happyrobot.ai/api/v1/models \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '{
  "use_case_id": "<string>",
  "name": "<string>",
  "from_model_id": "<string>",
  "train_sample_ids": [
    "<string>"
  ],
  "test_sample_ids": [
    "<string>"
  ],
  "explain_tools": true
}'
{
  "id": "<string>",
  "organization_id": "<string>",
  "use_case_id": "<string>",
  "created_at": "2024-01-01T01:01:01Z",
  "status": "pending",
  "name": "<string>",
  "description": "<string>",
  "train_sample_ids": [
    "<string>"
  ],
  "test_sample_ids": [
    "<string>"
  ],
  "from_model_id": "<string>",
  "trainable": false,
  "use_backup_for_generations": false,
  "use_backup_when_idle": false
}

Headers

authorization
string
required

Your API key for authentication. Use Bearer format.

Example:

"Bearer API_KEY"

Body

application/json
Body
use_case_id
string
required

ID of the use case.

name
string
required

Name of the model.

from_model_id
string
required

ID of the model to clone.

Required string length: 24
train_sample_ids
string[]
required

IDs of the training samples.

test_sample_ids
string[]
required

IDs of the testing samples.

explain_tools
boolean
default:true

Enable explain tools.

Response

200
application/json
200
id
string
required

ID of the model.

created_at
string
required

Creation date of the model.

Example:

"2024-01-01T01:01:01Z"

status
enum<string>
required

Status of the model.

Available options:
pending,
training,
active,
failed
name
string
required

Name of the model.

organization_id
string | null

ID of the organization.

use_case_id
string | null

ID of the use case.

description
string

Description of the model.

train_sample_ids
string[]

IDs of the training samples.

test_sample_ids
string[]

IDs of the testing samples.

from_model_id
string

ID of the model to clone.

trainable
boolean
default:false

Whether the model is trainable.

use_backup_for_generations
boolean
default:false

Whether to use the backup model for generations.

use_backup_when_idle
boolean
default:false

Whether to use the backup model when idle.