Create a new model instance in Syft Space. Models provide AI/ML capabilities through different providers like OpenAI, Anthropic, Ollama, or vLLM.
Request
Unique name for the model within your tenant.
Model type identifier. Use the list model types endpoint to see available types.Common values:
openai - OpenAI and OpenAI-compatible APIs
anthropic - Anthropic Claude models
ollama - Ollama local models
vllm - vLLM inference server
Model-specific configuration matching the schema for the selected dtype. Each model type requires different configuration fields.Show OpenAI configuration
OpenAI API key for authentication.
Model identifier to use for completions. Defaults to gpt-3.5-turbo.Examples: gpt-4, gpt-4-turbo, gpt-3.5-turbo
Custom base URL for OpenAI-compatible APIs. Defaults to https://api.openai.com/v1.
configuration.system_prompt
Default system prompt to prepend to all chat completions.
Brief description of the model’s purpose or use case.
Comma-separated tags for organizing and filtering models.Example: openai,gpt-4,assistant
Response
Unique identifier for the created model.
Model configuration as provided in the request.
Timestamp when the model was created.
Timestamp when the model was last updated.
curl -X POST https://your-server.com/api/v1/models \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "gpt-4-assistant",
"dtype": "openai",
"configuration": {
"api_key": "sk-...",
"model": "gpt-4",
"base_url": "https://api.openai.com/v1",
"system_prompt": "You are a helpful AI assistant."
},
"summary": "GPT-4 model for general assistance",
"tags": "openai,gpt-4,assistant"
}'
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "gpt-4-assistant",
"dtype": "openai",
"configuration": {
"api_key": "sk-...",
"model": "gpt-4",
"base_url": "https://api.openai.com/v1",
"system_prompt": "You are a helpful AI assistant."
},
"summary": "GPT-4 model for general assistance",
"tags": "openai,gpt-4,assistant",
"created_at": "2024-03-15T10:30:00Z",
"updated_at": "2024-03-15T10:30:00Z"
}
Endpoint