Barrack API Documentation
  1. Deploy Instance
Barrack API Documentation
  • Platform Documentation
    • Getting Started
    • Authentication & Access
    • Account Management
    • API Keys
    • GPU Models
    • Regions
    • Instance
      • OS Images
      • Bootsource Management
      • Deploy Instance
      • Instance Management
      • Hibernation
      • View Instances
    • SSH Keys
      • Add SSH Keys
      • Manage SSH Keys
    • Volumes
      • Overview
      • Create Volume
      • List and View Volumes
      • Attach Volumes
      • Detach Volumes
      • Clone Volumes
      • Resize Volume
      • Delete Volume
    • Advanced Configurations
      • Network And Security
      • Cloudinit Script
      • Startup Script
    • Firewall
      • Manage Firewall
      • Rules and Attachment
    • Snapshot
      • Overview
      • Manage Snapshots
      • Restore Snapshots
    • Custom Images
      • Overview
      • Create and Manage Images
    • dashboard
      • "Dashboard Overview"
      • "VM Management"
    • AI Chat
      • AI Chat
  • Balance
    • Get credit balance
      GET
  • Deploy Instance
    • Create a new instance
      POST
  • Pricing
    • Get pricing information
      GET
    • Get pricing information
      POST
  • Instances
    • List instances
      GET
    • Delete instance
      DELETE
    • 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 firewalls attached to instance
      GET
    • Add instance security rule
      POST
    • Remove instance security rule
      DELETE
    • Get instance billing
      GET
    • List Instance eligible for snapshot creation
      GET
  • SSH Keys
    • List SSH keys
    • Create SSH key
    • Get SSH key
    • Delete SSH key
  • Volumes
    • Attach volumes to instance
    • Detach volumes from instance
    • List volumes
    • Create volume
    • Get volume details
    • Delete volume
    • Clone volume
    • Resize volume
    • Get volume billing
    • List available volume types
  • 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
  • Snapshots
    • Create snapshot
    • List snapshots
    • Get snapshot details
    • Delete snapshot
    • Restore snapshot
    • Get snapshot billing
  • Images
    • List custom images
    • Get image details
    • Delete custom image
    • List OS images
    • Create image from snapshot
    • Get snapshot-image relationship
    • Get snapshot-image relationship list
  • Firewalls
    • List firewalls
    • Get firewall details
    • Attach firewall to instances
    • Delete firewall
    • Remove firewall rule
    • Add firewall rule
    • Create firewall
    • List instances available for firewall attachment
    • Get supported protocols
  • GPU Stocks
    • Get GPU stock availability
  • GPU Specs
    • Get GPU specifications
  • Regions
    • List available regions
  • AI Chat
    • Chat with AI
    • Get available AI models
  • AI Usage
    • Get AI usage history
    • Get AI usage summary
  • Schemas
    • AITransaction
    • AddFirewallRuleRequest
    • APIKeyResponse
    • AddFirewallRuleResponse
    • AddVMSecurityRuleResponse
    • AttachFirewallRequest
    • AggregatedBillingResponse
    • AttachFirewallResponse
    • AttachVolumesRequest
    • AttachVolumesResponse
    • AttachedFirewall
    • BatchSnapshotImageRelationshipResponse
    • Balance
    • Billing
    • ChatCompletionsRequest
    • ChatCompletionsResponse
    • CloneVolumeRequest
    • BillingRecord
    • BillingBreakdown
    • CloneVolumeResponse
    • BillingSummary
    • CreateFirewallRequest
    • CreateFirewallResponse
    • BootSourceEnum
    • CreateImageFromSnapshotRequest
    • BulkDeleteResponse
    • CreateSSHKeyRequest
    • CreateScriptRequest
    • CreateSnapshotRequest
    • CreateSnapshotResponse
    • CreateSSHKeyResponse
    • ComputeBilling
    • CurrencyEnum
    • Data
    • CreditBalanceResponse
    • CreateAPIKeyRequest
    • DeleteFirewallResponse
    • CreateVolumeRequest
    • CreateAPIKeyRequestTierEnum
    • DeleteSnapshotResponse
    • CreateVolumeResponse
    • CreateAPIKeyResponse
    • DeleteVMResponse
    • DetachVolumesRequest
    • DetachVolumesResponse
    • DeploymentRequest
    • DirectionEnum
    • DeploymentResponse
    • CreateSnapshotData
    • EthertypeEnum
    • ErrorResponse
    • FirewallAttachment
    • DeleteVolumeResponse
    • DeleteSSHKeyResponse
    • FirewallEnvironment
    • FirewallResponse
    • FirewallRule
    • FirewallVM
    • DataVolumeBilling
    • GetBatchSnapshotImageRelationshipsRequest
    • GetFirewallDetailsResponse
    • GPUStockConfiguration
    • GPUSpec
    • GetHibernatedVMsResponse
    • GPUStockItem
    • GPUSpecsResponse
    • GetSupportedProtocolsResponse
    • GPUStocksResponse
    • GetVMAttachedFirewallsResponse
    • DeploymentData
    • DeleteAPIKeyResponse
    • GetVolumeTypesResponse
    • HibernateVMResponse
    • HibernationBillingMetrics
    • ListFirewallsResponse
    • ListUserVMsResponse
    • ListVMsResponse
    • DeploymentDataStatusEnum
    • ModelsResponse
    • GetSSHKeysResponse
    • Pagination
    • PricingRequest
    • OSImage
    • Deposit
    • PricingResponse
    • OSImagesResponse
    • DepositStatusEnum
    • Protocol
    • GpuCountEnum
    • FirewallInstance
    • ProtocolEnum
    • Image
    • GpuModelEnum
    • GetVolumeDetailsResponse
    • RebootVMResponse
    • ImageCreateResponse
    • RecentHibernation
    • ImageDeleteResponse
    • GetVolumesWithNextNameResponse
    • RemoveFirewallRuleResponse
    • ImageDetailResponse
    • RemoveVMSecurityRuleResponse
    • Region
    • ImageListResponse
    • ResizeVolumeRequest
    • RegionsResponse
    • Price
    • ResizeVolumeResponse
    • ResourceTypeEnum
    • RestoreSnapshotRequest
    • RestoreSnapshotResponse
    • GetSSHKeyDetailResponse
    • RestoreVMResponse
    • Snapshot
    • SnapshotImageRelationshipResponse
    • GetSnapshotDetailsResponse
    • Specs
    • StartVMResponse
    • GpuBilling
    • StopVMResponse
    • TierEnum
    • UpdateScriptRequest
    • UsageHistoryResponse
    • UsageSummaryResponse
    • RegionEnum
    • UserVM
    • VMDetailsResponse
    • VMFlavor
    • InstanceFeatures
    • VMImage
    • InstanceSpecs
    • VMInstance
    • IpStatusEnum
    • VMResponse
    • SpecsMetadata
    • VMSecurityRule
    • VMSecurityRuleRequest
    • VMStatus
    • VMVolumeAttachment
    • Script
    • ListFirewallInstancesResponse
    • VolumeTypeEnum
    • SSHKeyResponse
    • ScriptListResponse
    • OsVolume
    • ListSnapshotsResponse
    • ListVMsForSnapshotResponse
    • ListAPIKeysResponse
    • PricingRequestVolumeTypeEnum
    • ToggleVMPublicIPResponse
    • PatchedDeposit
    • PatchedTransaction
    • PaymentMethodEnum
    • VolumeBillingRecord
    • VolumeBillingSummary
    • VolumeHourlyBillingResponse
    • SecurityRule
    • ScriptCreateResponse
    • RestoreSnapshotData
    • ScriptDeleteResponse
    • ScriptDetailResponse
    • VolumeResponse
    • ScriptUpdateResponse
    • StatusEnum
    • StorageBilling
    • SnapshotBillingRecord
    • SnapshotBillingResponse
    • SnapshotBillingSummary
    • SnapshotDetail
    • SnapshotListItem
    • SnapshotVMResponse
    • Tier528Enum
    • TokenObtainPair
    • TokenRefresh
    • Transaction
    • VolumeCreate
    • TransactionTypeEnum
    • VolumeCreateVolumeTypeEnum
    • VolumeRate
    • UserProfile
    • VMDetailVolumeAttachment
    • VMOperations
    • VMSpecs
    • VolumeTypeItem
    • VolumeTypesByTier
  1. Deploy Instance

Create a new instance

POST
/deploy-server/
Creates and deploys a GPU-accelerated virtual machine instance.

Authentication#

All requests require API key authentication. Include your API key in the X-API-Key header.
X-API-Key: sk_your_api_key_here

Tiers#

Legacy Tier (Available Now)
Region: CANADA-1
GPUs: RTX-A6000 (0.59/hr),L40(1.19/hr), A100-PCIe-80GB (1.49/hr),H100−PCIe−80GB(1.99/hr), H100-PCIe-NVLink-80GB ($2.29/hr)
Advanced Tier (Coming March 2025)
Regions: FINLAND-1, FINLAND-2, FINLAND-3
GPUs: H100-SXM5-80GB (2.69/hr),H200−141GB(3.49/hr), B200-180GB (4.69/hr),B300−262GB(5.89/hr)

Deployment Types#

Image-based: Deploy from OS image (requires image_name and ssh_key)
Volume boot: Deploy from existing bootable volume (requires volume_id and boot_from_volume: true)

Validation#

Validates GPU availability, account balance, and resource limits before deployment.
Returns instance details with billing breakdown and hardware specifications.

Request

Authorization
API Key
Add parameter in header
X-API-Key
Example:
X-API-Key: ********************
or
Body Params application/jsonRequired

Examples

Responses

🟢201
application/json
VM instance created successfully
Body

🟠400
🟠401
🟠402
🟠404
🟠413
🔴500
🔴503
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://barrack.ai/api/deploy-server/' \
--header 'X-API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "gpu_model": "RTX-A6000",
    "gpu_count": 1,
    "region": "CANADA-1",
    "instance_name": "string",
    "image_name": "string",
    "volume_id": "string",
    "boot_from_volume": false,
    "ssh_key": "string",
    "public_ip": true,
    "security_rules": [
        {
            "direction": "ingress",
            "protocol": "tcp",
            "ethertype": "IPv4",
            "port_range_min": 1,
            "port_range_max": 1,
            "remote_ip_prefix": "string"
        }
    ],
    "cloud_init": "string",
    "os_volume": {
        "size": 100
    },
    "existing_volumes": [
        "string"
    ],
    "volumes": [
        {
            "name": "string",
            "size": 100,
            "volume_type": "HDD"
        }
    ],
    "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-A1B2C3D",
        "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 credit balance
Next
Get pricing information
Built with