API reference

Models

Model records are scoped to the authenticated workspace. Use the returned model ID when running inference.

Resource shape

Stable fields

id, name, modality, task, size_mb, s3_key, version, status, user_id.

Versioning

Versions increment per model name and are reserved across validated models and in-flight uploads.
FieldTypeDescription
idstringUnique model ID. Use this value in /v1/models/{model_id}/infer.
namestringBase filename without .tar.gz or version suffix.
modalitystringimage or text.
taskstringclassification, object_detection, or embedding, depending on modality.
size_mbnumberUploaded bundle size rounded down to whole megabytes.
s3_keystringInternal object storage key for the versioned bundle.
versionnumberVersion reserved per model name and workspace.
statusstringvalidated for models that are ready for inference.
user_idstringWorkspace owner ID.
created_attimestampPresent when returned by the backing database.

Status lifecycle

Public model records are created only after upload validation succeeds. There is no separate pending or processing model state in the public API today; in-progress and failed states live on the upload resource.

StatusMeaning
validatedThe model bundle passed validation, the model record exists, and inference can run immediately.

Pagination

GET /v1/models does not currently paginate and does not accept cursor, offset, limit, or page parameters. The endpoint returns all model records for the authenticated workspace in a single models array, or an empty array when no models exist.

GET/v1/models

List models

Returns every validated model owned by the authenticated workspace.

Request

curl https://api.flashml.dev/v1/models \
  -H "Authorization: Bearer $FLASHML_API_KEY"

Response

{
  "models": [
    {
      "id": "6f2c8d9a-2e8d-4ed3-b9f2-9f3d2d2d7e8f",
      "name": "sentiment-classifier",
      "modality": "text",
      "task": "classification",
      "size_mb": 42,
      "s3_key": "user-id/sentiment-classifier-v1.tar.gz",
      "version": 1,
      "status": "validated",
      "user_id": "user-id",
      "created_at": "2026-05-21T16:48:03.120000+00:00"
    }
  ]
}
GET/v1/models/{model_id}

Retrieve a model

Fetches one model by ID. IDs are scoped to the API key owner.

Request

curl https://api.flashml.dev/v1/models/6f2c8d9a-2e8d-4ed3-b9f2-9f3d2d2d7e8f \
  -H "Authorization: Bearer $FLASHML_API_KEY"

Response

{
  "model": {
    "id": "6f2c8d9a-2e8d-4ed3-b9f2-9f3d2d2d7e8f",
    "name": "sentiment-classifier",
    "modality": "text",
    "task": "classification",
    "size_mb": 42,
    "s3_key": "user-id/sentiment-classifier-v1.tar.gz",
    "version": 1,
    "status": "validated",
    "user_id": "user-id",
    "created_at": "2026-05-21T16:48:03.120000+00:00"
  }
}