LLM API

Models

List the models in the Spicepod of a project, with their status and metadata, as JSON or CSV.

GET /v1/models lists the models in the Spicepod of the project: language models and machine learning models.

List Models

GEThttps://data.spiceai.io/v1/models

List all models, both machine learning and language models, available in the runtime. When status=true and a model is in Error, the response also includes:

  • error: structured code object with category, type, and stable code
  • error_message: user-visible details

Authorizations

  • X-API-KeystringRequired

    Your project API key. See API keys.

Query parameters

  • formatstring

    The format of the response (e.g., json or csv).

    • Allowed values: json, csv
  • statusboolean

    If true, includes the status of each model in the response.

  • metadata_fieldsstring

    A comma-separated list of metadata fields to include in the response (e.g., supports_responses_api)

Responses

200List of models in JSON formatapplication/json

application/json

Response wrapper for the /v1/models endpoint (OpenAI-compatible format).

  • dataarray of objectRequired

    The list of models

    8 properties
    • datasetsarray of string | null

      The datasets associated with this model, if any

    • errorobject | null

      An optional error type/code for the model status. Only populated when status=true and the model status is Error. Example: { "category": "model", "type": "auth", "code": "model.auth" }.

      3 properties
      • categorystringRequired

        High-level component category where the error originated.

        • Allowed values: dataset, model, worker, runtime
      • codestringRequired

        Stable machine-readable code ({category}.{type}), e.g. dataset.auth.

      • typestringRequired

        Canonical error type intended for programmatic handling.

        • Allowed values: auth, connection, timeout, validation, not_found, permission, rate_limit, internal, unknown
    • error_messagestring | null

      An optional error message describing why the model entered an error state. Only populated when status=true, the model status is Error, and an error message was recorded. This value is intended for user-visible display.

    • idstringRequired

      The name/identifier of the model

    • metadataobject | null

      Optional metadata fields, included when requested via query parameters

      1 property
      • supports_responses_apibooleanRequired

        Whether this model supports the Responses API

    • objectstringRequired

      The type of the object (always model)

    • owned_bystringRequired

      The source from which the model was loaded (e.g., openai, spiceai)

    • status"Initializing" | "Ready" | "Disabled" | object | "Refreshing" | "ShuttingDown" | "NotLoaded" | null

      The status of the model (e.g., Ready, Initializing, Error)

      • Example: Ready
      7 options

      One of

      "Initializing"string

      The component is initializing and not yet ready

      • Value: Initializing
      "Ready"string

      The component is ready to accept connections

      • Value: Ready
      "Disabled"string

      The component is disabled and not running

      • Value: Disabled
      object with Errorobject

      An error occurred in the component, with an optional error message

      • Errorstring | nullRequired

        An error occurred in the component, with an optional error message

      "Refreshing"string

      The component is in the process of refreshing its state

      • Value: Refreshing
      "ShuttingDown"string

      The component is in the process of shutting down

      • Value: ShuttingDown
      "NotLoaded"string

      The component is configured but not loaded yet

      • Value: NotLoaded
  • objectstringRequired

    The type of the response (always list)

text/csv

string

id,object,owned_by,datasets,status,error,error_message
gpt-4,model,openai,,ready,,
text-embedding-ada-002,model,openai-internal,"text-dataset-1,text-dataset-2",error,model.auth,Invalid API key
500Internal server error occurred while processing modelsapplication/json

any

OpenAPIspiceai/spiceai v2.3.2

curl "https://data.spiceai.io/v1/models" \
  -H "X-API-Key: <project-api-key>"
{
  "object": "list",
  "data": [
    {
      "id": "gpt-4",
      "object": "model",
      "owned_by": "openai",
      "datasets": null,
      "status": "ready",
      "error": null,
      "error_message": null
    },
    {
      "id": "text-embedding-ada-002",
      "object": "model",
      "owned_by": "openai-internal",
      "datasets": [
        "text-dataset-1",
        "text-dataset-2"
      ],
      "status": "error",
      "error": {
        "category": "model",
        "type": "auth",
        "code": "model.auth"
      },
      "error_message": "Invalid API key"
    }
  ]
}

application/json