Skip to main content
Create a new model instance in Syft Space. Models provide AI/ML capabilities through different providers like OpenAI, Anthropic, Ollama, or vLLM.

Request

name
string
required
Unique name for the model within your tenant.
dtype
string
required
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
configuration
object
required
Model-specific configuration matching the schema for the selected dtype. Each model type requires different configuration fields.
summary
string
Brief description of the model’s purpose or use case.
tags
string
Comma-separated tags for organizing and filtering models.Example: openai,gpt-4,assistant

Response

id
uuid
Unique identifier for the created model.
name
string
Model name.
dtype
string
Model type identifier.
configuration
object
Model configuration as provided in the request.
summary
string
Model description.
tags
string
Comma-separated tags.
created_at
datetime
Timestamp when the model was created.
updated_at
datetime
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

POST

Build docs developers (and LLMs) love