1{"responses":{"200":{"description":"List of models in JSON format","content":{"application/json":{"schema":{"type":"object","description":"Response wrapper for the `/v1/models` endpoint (OpenAI-compatible format).","required":["object","data"],"properties":{"data":{"type":"array","items":{"type":"object","description":"Model information returned in the `/v1/models` response (OpenAI-compatible format).","required":["id","object","owned_by"],"properties":{"datasets":{"type":["array","null"],"items":{"type":"string"},"description":"The datasets associated with this model, if any"},"error":{"oneOf":[{"type":"null"},{"description":"An optional error type/code for the model status.\nOnly populated when `status=true` and the model status is `Error`.\nExample:\n`{ \"category\": \"model\", \"type\": \"auth\", \"code\": \"model.auth\" }`.","type":"object","required":["category","type","code"],"properties":{"category":{"description":"High-level component category where the error originated.","type":"string","enum":["dataset","model","worker","runtime"],"title":"ComponentErrorCategory"},"code":{"type":"string","description":"Stable machine-readable code (`{category}.{type}`), e.g. `dataset.auth`."},"type":{"description":"Canonical error type intended for programmatic handling.","type":"string","enum":["auth","connection","timeout","validation","not_found","permission","rate_limit","internal","unknown"],"title":"ComponentErrorType"}},"title":"ComponentError"}]},"error_message":{"type":["string","null"],"description":"An optional error message describing why the model entered an error state.\nOnly populated when `status=true`, the model status is `Error`, and an error message was recorded.\nThis value is intended for user-visible display."},"id":{"type":"string","description":"The name/identifier of the model"},"metadata":{"oneOf":[{"type":"null"},{"description":"Optional metadata fields, included when requested via query parameters","type":"object","required":["supports_responses_api"],"properties":{"supports_responses_api":{"type":"boolean","description":"Whether this model supports the Responses API"}},"title":"ModelMetadata"}]},"object":{"type":"string","description":"The type of the object (always `model`)"},"owned_by":{"type":"string","description":"The source from which the model was loaded (e.g., `openai`, `spiceai`)"},"status":{"oneOf":[{"type":"null"},{"description":"The status of the model (e.g., `Ready`, `Initializing`, `Error`)","oneOf":[{"type":"string","description":"The component is initializing and not yet ready","enum":["Initializing"]},{"type":"string","description":"The component is ready to accept connections","enum":["Ready"]},{"type":"string","description":"The component is disabled and not running","enum":["Disabled"]},{"type":"object","description":"An error occurred in the component, with an optional error message","required":["Error"],"properties":{"Error":{"type":["string","null"],"description":"An error occurred in the component, with an optional error message"}}},{"type":"string","description":"The component is in the process of refreshing its state","enum":["Refreshing"]},{"type":"string","description":"The component is in the process of shutting down","enum":["ShuttingDown"]}],"example":"Ready","title":"String"}]}},"title":"ModelInfo"},"description":"The list of models"},"object":{"type":"string","description":"The type of the response (always `list`)"}},"title":"ModelListResponse"},"example":{"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"}]}},"text/csv":{"schema":{"type":"string"},"example":"\nid,object,owned_by,datasets,status,error,error_message\ngpt-4,model,openai,,ready,,\ntext-embedding-ada-002,model,openai-internal,\"text-dataset-1,text-dataset-2\",error,model.auth,Invalid API key\n"}}},"500":{"description":"Internal server error occurred while processing models","content":{"application/json":{"schema":{},"example":{"error":"App not initialized"}}}}}}
1{"responses":{"200":{"description":"List of models in JSON format","content":{"application/json":{"schema":{"type":"object","description":"Response wrapper for the `/v1/models` endpoint (OpenAI-compatible format).","required":["object","data"],"properties":{"data":{"type":"array","items":{"type":"object","description":"Model information returned in the `/v1/models` response (OpenAI-compatible format).","required":["id","object","owned_by"],"properties":{"datasets":{"type":["array","null"],"items":{"type":"string"},"description":"The datasets associated with this model, if any"},"error":{"oneOf":[{"type":"null"},{"description":"An optional error type/code for the model status.\nOnly populated when `status=true` and the model status is `Error`.\nExample:\n`{ \"category\": \"model\", \"type\": \"auth\", \"code\": \"model.auth\" }`.","type":"object","required":["category","type","code"],"properties":{"category":{"description":"High-level component category where the error originated.","type":"string","enum":["dataset","model","worker","runtime"],"title":"ComponentErrorCategory"},"code":{"type":"string","description":"Stable machine-readable code (`{category}.{type}`), e.g. `dataset.auth`."},"type":{"description":"Canonical error type intended for programmatic handling.","type":"string","enum":["auth","connection","timeout","validation","not_found","permission","rate_limit","internal","unknown"],"title":"ComponentErrorType"}},"title":"ComponentError"}]},"error_message":{"type":["string","null"],"description":"An optional error message describing why the model entered an error state.\nOnly populated when `status=true`, the model status is `Error`, and an error message was recorded.\nThis value is intended for user-visible display."},"id":{"type":"string","description":"The name/identifier of the model"},"metadata":{"oneOf":[{"type":"null"},{"description":"Optional metadata fields, included when requested via query parameters","type":"object","required":["supports_responses_api"],"properties":{"supports_responses_api":{"type":"boolean","description":"Whether this model supports the Responses API"}},"title":"ModelMetadata"}]},"object":{"type":"string","description":"The type of the object (always `model`)"},"owned_by":{"type":"string","description":"The source from which the model was loaded (e.g., `openai`, `spiceai`)"},"status":{"oneOf":[{"type":"null"},{"description":"The status of the model (e.g., `Ready`, `Initializing`, `Error`)","oneOf":[{"type":"string","description":"The component is initializing and not yet ready","enum":["Initializing"]},{"type":"string","description":"The component is ready to accept connections","enum":["Ready"]},{"type":"string","description":"The component is disabled and not running","enum":["Disabled"]},{"type":"object","description":"An error occurred in the component, with an optional error message","required":["Error"],"properties":{"Error":{"type":["string","null"],"description":"An error occurred in the component, with an optional error message"}}},{"type":"string","description":"The component is in the process of refreshing its state","enum":["Refreshing"]},{"type":"string","description":"The component is in the process of shutting down","enum":["ShuttingDown"]}],"example":"Ready","title":"String"}]}},"title":"ModelInfo"},"description":"The list of models"},"object":{"type":"string","description":"The type of the response (always `list`)"}},"title":"ModelListResponse"},"example":{"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"}]}},"text/csv":{"schema":{"type":"string"},"example":"\nid,object,owned_by,datasets,status,error,error_message\ngpt-4,model,openai,,ready,,\ntext-embedding-ada-002,model,openai-internal,\"text-dataset-1,text-dataset-2\",error,model.auth,Invalid API key\n"}}},"500":{"description":"Internal server error occurred while processing models","content":{"application/json":{"schema":{},"example":{"error":"App not initialized"}}}}}}
