Manage Dedicated Deployments with an API

All endpoints are hosted at https://roboflow.cloud.

Check the response code:

  • If it is 200, decode the response body as a JSON object.
  • Otherwise, the response body contains an error message as a string.

POST /add — Create a Dedicated Deployment

Request Body Example (JSON):

{
    "api_key": "API_KEY",
    "deployment_name": "dev-testing",
    "machine_type": "dev-gpu",
    "creator_email": "YOUR_EMAIL_ADDRESS",
    "duration": 3.0,
    "inference_version": "latest",
    "min_replicas": 1,
    "max_replicas": 1
}

Request Body Schema:

  • api_key (string): required
  • deployment_name (string): required
  • machine_type (string): required
  • creator_email (string): required
  • duration (float): optional, unit is hour. Default is 3
  • inference_version (string): optional, default is latest
  • min_replicas (integer): optional, default is 1
  • max_replicas (integer): optional, default is 1

Response Example (JSON):

{
    "deployment_id": "IwzJ5YLQ0iDhwzqoh3Ae",
    "deployment_name": "dev-testing",
    "machine_type": "dev-gpu",
    "creator_email": "YOUR_EMAIL_ADDRESS",
    "creator_id": "YOUR_USER_ID",
    "subdomain": "dev-testing",
    "domain": "dev-testing.roboflow.cloud",
    "duration": 3.0,
    "inference_version": "0.45.0",
    "max_replicas": 1,
    "min_replicas": 1,
    "num_replicas": 0,
    "status": "pending",
    "workspace_id": "YOUR_WORKSPACE_ID",
    "workspace_url": "YOUR_WORKSPACE_URL"
}

Response Schema:

  • deployment_id (string): unique identifier
  • deployment_name (string)
  • machine_type (string)
  • creator_email (string)
  • creator_id (string): the user id corresponding to creator_email
  • subdomain (string): not always the same as deployment_name; a suffix is added if the subdomain is already taken
  • domain (string)
  • duration (float)
  • inference_version (string)
  • min_replicas (integer)
  • max_replicas (integer)
  • num_replicas (integer): current available replicas
  • status (string)
  • workspace_id (string)
  • workspace_url (string)

GET /list — List Dedicated Deployments

Query Parameters:

  • api_key (string): required
  • show_expired (string): optional, default is false
  • show_deleted (string): optional, default is false

Response: A list of dedicated deployment entries, each with the same schema as the /add endpoint response.

GET /get — Get Deployment Details

Query Parameters:

  • api_key (string): required
  • deployment_name (string): required

Response: Same schema as the /add endpoint response.

GET /get_log — Get Deployment Logs

Query Parameters:

  • api_key (string): required
  • deployment_name (string): required
  • max_entries (integer): optional, default is 50
  • from_timestamp (string): optional, in ISO 8601 format, default is 1 hour before current time
  • to_timestamp (string): optional, in ISO 8601 format, default is current time

Response Example (JSON):

[
    {
        "insert_id": "gpwrgrw55p7b9jdq",
        "payload": "INFO:     10.18.0.38:46296 - \"GET /info HTTP/1.1\" 200 OK",
        "severity": "INFO",
        "timestamp": "2025-01-22T13:23:14.209436+00:00"
    }
]

Response Schema: A list of log entries with the following attributes:

  • insert_id (string): unique identifier for each log entry
  • payload (string): log content
  • severity (string)
  • timestamp (string)

POST /pause — Pause a Dedicated Deployment

Request Body (JSON):

{
    "api_key": "API_KEY",
    "deployment_name": "dev-testing"
}

Response:

{
    "message": "OK"
}

POST /resume — Resume a Dedicated Deployment

Request Body (JSON):

{
    "api_key": "API_KEY",
    "deployment_name": "dev-testing"
}

Response:

{
    "message": "OK"
}

POST /delete — Delete a Dedicated Deployment

Request Body (JSON):

{
    "api_key": "API_KEY",
    "deployment_name": "dev-testing"
}

Response:

{
    "message": "OK"
}