Getting Started
Guide to deploying models using the CX CLI.
Contents
Prerequisites
MacOS or Linux Operating system
Docker. CX CLI uses Docker to package images. Get it from here.
pip. for installing the CX CLI
python 3.8. Or higher
Installation
Install the CX CLI using pip:
$ pip install computex-cli
Logging In
Log in to the CLI using the CX credentials
$ cx login --username {username} --password {password}
Set up an account on CX
Sign up for an account on computex.ai. You will receive a confirmation email with you access key.
Updating your password
When you first create an account on CX, you'll be prompted to change your password. You can also update your password anytime by following the steps below:
Using the CX CLI
Login to the CX CLI using your CX credentials, then run the change-password
command.
$ cx login --username {username} --password {password}
$ cx change-password
Using the API
Endpoint: Send a POST request to the /users/change_password endpoint.
Command
$ curl -X 'POST' \
'https://api.computex.co/api/v1/users/change_password' \
-H 'accept: application/json' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
-H 'Content-Type: application/json' \
-d '{
"old_password": "original-password",
"new_password": "new-password",
"confirm_new_password": "new-password"
}'
Replace YOUR_ACCESS_TOKEN with your access token, and ensure you input the correct old_password and desired new_password.
Password Policy
When creating or updating your password on CX, please ensure your password adheres to the following criteria:
Length: Your password must be between 8 and 32 characters long.
Uppercase Letters: Your password must contain at least one uppercase letter (A-Z).
Lowercase Letters: Your password must contain at least one lowercase letter (a-z).
Numbers: Your password must contain at least one number (0-9).
API Interface
The CX API (api.computex.ai) has all of the tools to interact with backend CX infrastructure.
Functionality includes:
Deploying Serverless AI models
Deploying AI models on Always-on Servers
Spawning Virtual Servers
Checking logs from deployments
Running Inference on deployed models
Geting billing information
Access Publicly Available Postman Collection
To access the publicly available Postman Workspace, click here.
This collection can be cloned and imported into your own Postman Workspace.
Using the API
To interact with the API, start off by authenticating. The API is secured with JWT Bearer Auth. Enter the following to receive the JWT Token:
curl -X 'POST' \
'http://api.computex.ai/api/v1/users/login' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"email": "[email protected]",
"password": "your-password"
}'
Successful Response:
{
"token": "ey...",
"refresh_token": "ey..."
}
Use the token generated from the response to pass in the headers of all subsequent API calls. For example:
curl -X 'GET' \
'http://api.computex.ai/api/v1/deployments/deployments' \
-H 'accept: application/json' \
-H 'Authorization: Bearer ey...'
Last updated