Custom Models API - Data Models
Reference for request and response schemas used in the Custom Models API.
Model Object
type Model = {
id: number;
key: string;
name: string;
last_modified: string;
organization_id: number;
language_data: null;
is_trainable: boolean;
type: number;
base_language_id: number;
base_language_key: string;
training_log?: {
language_id: number;
training_status: number;
log_name: null;
};
};
Field Specifications
| Field | Type | Description |
|---|---|---|
id | number | Unique model identifier |
key | string | Model key identifier |
name | string | Model name |
last_modified | string | Last modification timestamp |
organization_id | number | Organization identifier |
language_data | null | Language data (currently null) |
is_trainable | boolean | Whether model can be trained |
type | number | Model type identifier |
base_language_id | number | Base language identifier |
base_language_key | string | Base language key |
training_log | object | Optional training log information |
Training Log Object
type TrainingLog = {
language_id: number;
training_status: number;
log_name: null;
};
| Field | Type | Description |
|---|---|---|
language_id | number | Language identifier for training |
training_status | number | Training status code |
log_name | null | Log file name (currently null) |
Create Model Request
type CreateCustomModelPayload = {
name: string;
language_id: number;
organization_id: number;
};
Update Model Request
type UpdateModelBody = {
name: string;
language_id: number;
organization_id: number;
};
List Response
type CustomModels = {
count: number;
total_results: number;
result: Model[];
};
Single Model Response
type Models = {
count: number;
total_results: number;
result: Model;
};
Create Response
type CreateCustomModelResponse = {
result:
| { id: number; name: string; type: number }
| Array<{ id: number; name: string; type: number }>;
count?: number;
total_results?: number;
};
Notes
- All responses are wrapped in
BaseResponse<T>structure - Timestamps are in ISO 8601 format
- Training status is represented as a numeric code
- Models are organization-scoped
- Language is identified by numeric ID, not code
Related Documentation
- Create - Create model endpoint details
- List - List models with pagination
- Get - Retrieve model details
- Update - Update model metadata
- Delete - Delete model
- TrainingData - Upload training data
- Train - Start training and monitor progress
- Custom Models Overview - Complete guide
Reference for success! Use this data models guide to understand request/response structures and build robust custom model integrations.