Barrack API Documentation
  1. Deploy Instance
Barrack API Documentation
  • Platform Documentation
    • "Authentication & Access"
    • "Getting Started"
    • "Platform Documentation"
    • "Troubleshooting"
    • vm
      • "Advanced Configuration"
      • "Boot Source Configuration"
      • "GPU Configuration"
      • "Region Selection"
      • "SSH Key Configuration"
      • "VM States & Billing"
    • storage
      • "Managing Volumes"
      • "Storage Management"
    • ssh
      • "Creating SSH Keys"
      • "Importing SSH Keys"
      • "Managing SSH Keys"
    • security
      • "Attaching Firewalls to VMs"
      • "Firewall Management"
      • "Firewall Rules"
    • dashboard
      • "Dashboard Overview"
      • "VM Management"
    • backup
      • "Creating Snapshots"
      • "Custom Images"
      • "Managing Snapshots"
      • "Restoring Snapshots"
      • "Snapshots Management"
    • account
      • "Credits System"
      • "Account Management"
  • Balance
    • Get credit balance
      GET
  • GPU Stocks
    • Get GPU stock availability
      GET
  • GPU Specs
    • Get GPU specifications
      GET
  • Regions
    • List available regions
      GET
  • Pricing
    • Get pricing information
      GET
    • Get pricing information
      POST
  • Deploy Instance
    • Create a new instance
      POST
  • Instance management
    • List instances
      GET
    • Delete instance
      DELETE
    • Get instance billing
      GET
    • Hibernate instance
      POST
    • Reboot instance
      POST
    • Restore hibernated instance
      POST
    • Start instance
      POST
    • Stop instance
      POST
    • Toggle public IP for instance
      POST
    • Get instance details
      GET
    • Get hibernated instances count
      GET
    • Add instance security rule
      POST
    • Remove instance security rule
      DELETE
  • OS Images
    • List OS images
  • SSH Keys
    • List SSH keys
    • Create SSH key
    • Get SSH key
    • Delete SSH key
  • Scripts
    • List all startup scripts
    • Create a startup script
    • Get startup script details
    • Update a startup script
    • Delete a startup script
    • Delete multiple startup scripts
  • Firewalls
    • List firewalls
    • Get firewall details
    • Attach firewall to instances
    • Get firewalls attached to instance
    • Delete firewall
    • Remove firewall rule
    • Add firewall rule
    • Create firewall
    • Get supported protocols
    • List instances available for firewall attachment
    • List instances available for firewall attachment
  • Snapshots
    • List snapshots
    • Get snapshot billing
    • List Instance eligible for snapshot creation
    • Get snapshot details
    • Delete snapshot
    • Restore snapshot
    • Create snapshot
    • Create snapshot
    • Get snapshot billing
  • Images
    • List custom images
    • Get image details
    • Delete custom image
    • Create image from snapshot
    • Get snapshot-image relationship
    • Get snapshot-image relationship list
  • AI Chat
    • Chat with AI
    • Get AI usage summary
    • Get AI usage history
    • Get available AI models
  • Volumes
    • Attach volumes to instance
    • Detach volumes from instance
    • Clone volume
    • Resize volume
    • Get volume billing
    • List available volume types
    • List volumes
    • Create volume
    • Get volume details
    • Delete volume
  • Virtual Machines
    • Get firewalls attached to instance
    • Remove instance security rule
    • List Instance eligible for snapshot creation
  • Schemas
    • AITransaction
    • AddFirewallRuleRequest
    • AddFirewallRuleResponse
    • AddVMSecurityRuleResponse
    • AttachFirewallRequest
    • AggregatedBillingResponse
    • AttachFirewallResponse
    • AttachVolumesRequest
    • AttachVolumesResponse
    • AttachedFirewall
    • BatchSnapshotImageRelationshipResponse
    • Balance
    • Billing
    • ChatCompletionsRequest
    • ChatCompletionsResponse
    • CloneVolumeRequest
    • BillingRecord
    • CloneVolumeResponse
    • BillingSummary
    • CreateFirewallRequest
    • CreateFirewallResponse
    • CreateImageFromSnapshotRequest
    • CreateSSHKeyRequest
    • CreateScriptRequest
    • CreateSnapshotRequest
    • CreateSnapshotResponse
    • CreateSSHKeyResponse
    • CurrencyEnum
    • Data
    • CreditBalanceResponse
    • DeleteFirewallResponse
    • CreateVolumeRequest
    • DeleteSnapshotResponse
    • CreateVolumeResponse
    • DeleteVMResponse
    • DetachVolumesRequest
    • DetachVolumesResponse
    • DeploymentRequest
    • DirectionEnum
    • DeploymentResponse
    • EthertypeEnum
    • ErrorResponse
    • FirewallAttachment
    • DeleteVolumeResponse
    • DeleteSSHKeyResponse
    • FirewallEnvironment
    • FirewallResponse
    • FirewallRule
    • FirewallVM
    • GetBatchSnapshotImageRelationshipsRequest
    • GetFirewallDetailsResponse
    • GPUStockConfiguration
    • GPUSpec
    • GetHibernatedVMsResponse
    • GPUStockItem
    • GPUSpecsResponse
    • GetSupportedProtocolsResponse
    • GPUStocksResponse
    • GetVMAttachedFirewallsResponse
    • GetVolumeTypesResponse
    • HibernateVMResponse
    • HibernationBillingMetrics
    • ListFirewallsResponse
    • ListUserVMsResponse
    • ListVMsResponse
    • ModelsResponse
    • GetSSHKeysResponse
    • Pagination
    • PricingRequest
    • OSImage
    • PricingResponse
    • OSImagesResponse
    • Protocol
    • GpuCountEnum
    • ProtocolEnum
    • Image
    • GpuModelEnum
    • GetVolumeDetailsResponse
    • RebootVMResponse
    • ImageCreateResponse
    • RecentHibernation
    • ImageDeleteResponse
    • GetVolumesWithNextNameResponse
    • RemoveFirewallRuleResponse
    • ImageDetailResponse
    • RemoveVMSecurityRuleResponse
    • Region
    • ImageListResponse
    • ResizeVolumeRequest
    • RegionsResponse
    • Price
    • ResizeVolumeResponse
    • ResourceTypeEnum
    • RestoreSnapshotRequest
    • RestoreSnapshotResponse
    • RestoreVMResponse
    • Snapshot
    • SnapshotImageRelationshipResponse
    • Specs
    • StartVMResponse
    • StopVMResponse
    • TierEnum
    • UpdateScriptRequest
    • UsageHistoryResponse
    • UsageSummaryResponse
    • RegionEnum
    • UserVM
    • VMDetailsResponse
    • VMFlavor
    • VMImage
    • VMInstance
    • VMResponse
    • SpecsMetadata
    • VMSecurityRule
    • VMSecurityRuleRequest
    • VMStatus
    • VMVolumeAttachment
    • Script
    • VolumeTypeEnum
    • SSHKeyResponse
    • ScriptListResponse
    • ToggleVMPublicIPResponse
    • VolumeBillingRecord
    • VolumeBillingSummary
    • VolumeHourlyBillingResponse
    • VolumeResponse
  1. Deploy Instance

Create a new instance

POST
/deploy-server/
Creates and deploys a GPU-accelerated virtual machine instance.
Supports image-based deployments (from OS images) and volume boot deployments (from existing volumes).
Available across Legacy tier (CANADA-1) and Advanced tier (Nordic regions).
Validates GPU availability, account balance, and resource limits before deployment.
Returns instance details with billing breakdown and hardware specifications.

Request

Body Params application/jsonRequired

Examples

Responses

🟢201
application/json
VM instance created successfully
Body

🟠400
🟠401
🟠402
🟠404
🔴500
🔴503
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://barrack.ai/api/deploy-server/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "gpu_model": "RTX-A6000",
    "gpu_count": 1,
    "region": "FINLAND-1",
    "instance_name": "string",
    "image_name": "string",
    "volume_id": "string",
    "boot_from_volume": false,
    "ssh_key": "string",
    "public_ip": true,
    "security_rules": [
        {
            "property1": null,
            "property2": null
        }
    ],
    "cloud_init": "string",
    "os_volume": {
        "property1": null,
        "property2": null
    },
    "existing_volumes": [
        "string"
    ],
    "volumes": [
        {
            "property1": null,
            "property2": null
        }
    ],
    "script_id": "string"
}'
Response Response Example
201 - Advanced Tier Image Deployment
{
    "success": true,
    "message": "VM deployed successfully",
    "request_id": "a1b2c3d4",
    "timestamp": "2025-01-15T10:30:00Z",
    "data": {
        "instance_id": "BRK-A1B2C3VM",
        "vm_name": "barrack-h100s-xyz",
        "region": "FINLAND-1",
        "ip_address": null,
        "ip_status": "pending",
        "billing": {
            "breakdown": {
                "compute": {
                    "gpu": {
                        "model": "H100-SXM5-80GB",
                        "count": 4,
                        "hourly_rate": 9.96
                    }
                },
                "storage": {
                    "os_volume": {
                        "size_gb": 100,
                        "type": "NVMe",
                        "hourly_rate": 0.0293
                    },
                    "data_volumes": [],
                    "data_volumes_total": 0
                }
            },
            "total_hourly_rate": 9.9893,
            "currency": "USD"
        },
        "specs": {
            "gpu_type": "H100-SXM5-80GB",
            "gpu_count": 4,
            "ram_gb": 740,
            "vcpus": 176,
            "storage_gb": 100
        },
        "status": "CREATING",
        "boot_source": "image",
        "operating_system": "Ubuntu 24.04 + CUDA 12.8 Open + Docker",
        "features": {
            "startup_script_configured": false
        },
        "created_at": "2025-01-15T10:30:00Z"
    },
    "tier": "advanced"
}
Previous
Get pricing information
Next
List instances
Built with