Model types define the different AI/ML providers supported by Syft Space. Each type has its own configuration requirements and capabilities.
List model types
Get all available model types with their configuration schemas.
Response
Model type identifier used in the dtype field when creating models.
Human-readable description of the model type and its capabilities.
Icon representation for the model type.
Whether this model type is currently enabled. Disabled types may lack required dependencies.
JSON schema describing the required and optional configuration fields for this model type.
curl https://your-server.com/api/v1/models/types \
-H "Authorization: Bearer YOUR_API_KEY"
[
{
"name" : "openai" ,
"description" : "OpenAI model type for interacting with OpenAI's API. \n\n Supports OpenAI's chat completion API and compatible endpoints. \n Can be configured with API key, model selection, and custom base URL. \n\n Reference: https://platform.openai.com/docs/api-reference" ,
"icon" : "🤖" ,
"enabled" : true ,
"config_schema" : {
"type" : "object" ,
"properties" : {
"api_key" : {
"type" : "string" ,
"title" : "OpenAI API Key" ,
"description" : "Your OpenAI API key"
},
"model" : {
"type" : "string" ,
"title" : "Model" ,
"description" : "Model to use for chat completions" ,
"default" : "gpt-3.5-turbo"
},
"base_url" : {
"type" : "string" ,
"title" : "Base URL" ,
"description" : "Custom base URL for OpenAI-compatible APIs (optional)" ,
"default" : "https://api.openai.com/v1"
},
"system_prompt" : {
"type" : "string" ,
"title" : "System Prompt" ,
"description" : "System prompt to use for chat completions" ,
"default" : ""
}
},
"required" : [ "api_key" ],
"order" : [ "api_key" , "model" , "base_url" ]
}
}
]
Endpoint
HTTP Method
Path
Authentication
Get model type
Get detailed information about a specific model type.
Path parameters
Model type identifier (e.g., openai, anthropic).
Response
Returns a single model type object with the same structure as the list endpoint.
curl https://your-server.com/api/v1/models/types/openai \
-H "Authorization: Bearer YOUR_API_KEY"
{
"name" : "openai" ,
"description" : "OpenAI model type for interacting with OpenAI's API. \n\n Supports OpenAI's chat completion API and compatible endpoints. \n Can be configured with API key, model selection, and custom base URL. \n\n Reference: https://platform.openai.com/docs/api-reference" ,
"icon" : "🤖" ,
"enabled" : true ,
"config_schema" : {
"type" : "object" ,
"properties" : {
"api_key" : {
"type" : "string" ,
"title" : "OpenAI API Key" ,
"description" : "Your OpenAI API key"
},
"model" : {
"type" : "string" ,
"title" : "Model" ,
"description" : "Model to use for chat completions" ,
"default" : "gpt-3.5-turbo"
},
"base_url" : {
"type" : "string" ,
"title" : "Base URL" ,
"description" : "Custom base URL for OpenAI-compatible APIs (optional)" ,
"default" : "https://api.openai.com/v1"
},
"system_prompt" : {
"type" : "string" ,
"title" : "System Prompt" ,
"description" : "System prompt to use for chat completions" ,
"default" : ""
}
},
"required" : [ "api_key" ],
"order" : [ "api_key" , "model" , "base_url" ]
}
}
Endpoint
HTTP Method
Path
Authentication
Get model type schema
Get only the configuration schema for a specific model type.
Path parameters
Response
Returns the JSON schema object for the model type’s configuration.
curl https://your-server.com/api/v1/models/types/openai/schema \
-H "Authorization: Bearer YOUR_API_KEY"
{
"type" : "object" ,
"properties" : {
"api_key" : {
"type" : "string" ,
"title" : "OpenAI API Key" ,
"description" : "Your OpenAI API key"
},
"model" : {
"type" : "string" ,
"title" : "Model" ,
"description" : "Model to use for chat completions" ,
"default" : "gpt-3.5-turbo"
},
"base_url" : {
"type" : "string" ,
"title" : "Base URL" ,
"description" : "Custom base URL for OpenAI-compatible APIs (optional)" ,
"default" : "https://api.openai.com/v1"
},
"system_prompt" : {
"type" : "string" ,
"title" : "System Prompt" ,
"description" : "System prompt to use for chat completions" ,
"default" : ""
}
},
"required" : [ "api_key" ],
"order" : [ "api_key" , "model" , "base_url" ]
}
Endpoint
HTTP Method
Path
Authentication
Supported model types
Syft Space supports the following model types:
OpenAI
Type identifier: openai
Supports OpenAI’s chat completion API and OpenAI-compatible APIs (e.g., Azure OpenAI, LocalAI, LM Studio).
Configuration:
api_key (required): OpenAI API key
model: Model identifier (default: gpt-3.5-turbo)
base_url: Custom API endpoint (default: https://api.openai.com/v1)
system_prompt: Default system message
Example models: gpt-4, gpt-4-turbo, gpt-3.5-turbo
OpenAI-compatible providers:
The OpenAI model type supports any provider with an OpenAI-compatible API. Use the base_url parameter to connect to alternative providers:
Ollama
vLLM
Other providers
{
"dtype" : "openai" ,
"configuration" : {
"base_url" : "http://localhost:11434/v1" ,
"api_key" : "not-needed" ,
"model" : "llama2"
}
}
Supports locally-hosted Ollama models. Available models depend on what you’ve pulled (e.g., llama2, mistral, codellama, phi). {
"dtype" : "openai" ,
"configuration" : {
"base_url" : "http://localhost:8000/v1" ,
"api_key" : "optional-token" ,
"model" : "meta-llama/Llama-2-7b"
}
}
Supports vLLM inference server for high-performance model serving. Any service implementing the OpenAI chat completion API can be used by setting the appropriate base_url.
Currently, only the OpenAI model type is implemented. Support for native Anthropic API (non-OpenAI-compatible) is planned for future releases.