API
Last updated
Last updated
CLORE.AI api can be used to automate deployments of your workloads onto CLORE.AI
Responses are returned in JSON format, may have different fields
Always returned field is code, indicating status
code field
wallets
About
Return wallets and balances
Headers
Output
Example
Input:
Output:
my_servers
About
Returns your servers that you are providing to clore.ai marketplace
Headers
Output
Example
Input:
Output:
*USD not implemented yet
server_config
About
Get configuration of specific server
Headers
Body
Output
Example
Input:
Output:
*USD not implemented yet
marketplace
About
Get marketplace
Headers
Output
Example
Get marketplace
Input:
Output:
my_orders
About
Get your orders
Headers
Query string
Output
Input:
Output:
spot_marketplace
About
Get spot marketplace for specific server
Headers
Query string
Output
Input:
Output:
set_server_settings
About
Configure settings of server you are providing on clore.ai marketplace
Headers
Body
Output
Example
Let's create a send proof for a transaction sent from the current wallet.
Input:
Output:
set_spot_price
About
Set price per day on your SPOT market offer
Headers
Body
Example
Let's try to update spot market price
Input 1 (Step down was too big):
Possible output 1 (Step down was too big): You can lower spot market offer price by max of 0.00000100 ₿
Input 2 (Valid price step down):
Possible output 2 (Valid price step down):
Input 3 (Lower price even more after sending Input 2):
Possible output 3 (Lower price even more after sending Input 2): You can lower spot price once in 600 seconds
cancel_order
About
Set price per day on your SPOT market offer
Headers
Body
Output
Example
Cancel order/offer
Input: In this example we are reporting issues with GPU #1, if you don't have issues, don't include issue field. You can write any message to text field and we will investigate it
Output:
create_order
About
You can create spot offer or on demand order with this endpoint This endpoint also allows only 1 request in 5 seconds
Headers
Body
* To fields marked with star you can only input characters from this regexp group /^[a-zA-Z0-9\s-=.@+/]+$/
Output
Example
Input 1 (Create spot offer):
Output 1 (Create spot offer):
Input 2 (Create on demand order):
Output 2 (Create on demand order):
Firstly you need to get an API key
code | Description |
---|---|
Field | Type | Mandatory | Description |
---|---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Mandatory | Description |
---|---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Mandatory | Description |
---|---|---|---|
Field | Type | Mandatory | Description |
---|---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Mandatory | Description |
---|---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Mandatory | Description |
---|---|---|---|
Field | Type | Mandatory | Description |
---|---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Mandatory | Description |
---|---|---|---|
Field | Type | Mandatory | Description |
---|---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Mandatory | Description |
---|---|---|---|
Field | Type | Mandatory | Description |
---|---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Mandatory | Description |
---|---|---|---|
Field | Type | Mandatory | Description |
---|---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Mandatory | Description |
---|---|---|---|
Field | Type | Mandatory | Description |
---|---|---|---|
Field | Type | Description |
---|---|---|
Field | Type | Mandatory | Description |
---|---|---|---|
Field | Type | Mandatory | Description |
---|---|---|---|
Field | Type | Description |
---|---|---|
0
NORMAL
1
DATABASE ERROR
2
INVALID INPUT DATA
3
INVALID API TOKEN
4
INVALID ENDPOINT
5
EXCEEDED 1 request/second limit
6
Error specified in error
field
auth
string
Yes
API token
code
int
Status code
wallets
[]string
Array of wallets
auth
string
Yes
API token
code
int
Status code
limit
int
Maximum number of servers you can own
servers
[]string
Array of servers
servers[x].name
string
User selected server name
servers[x].connected
string
Was the server ever connected to clore.ai
servers[x].visibility
string
Visibility on marketplace
servers[x].pricing
[]string
Price/day on-demand
servers[x].online
bool
Is server online
servers[x].min_spot_pricing
[]string
Minimal price/day to rent for on spot market
servers[x].init_token
string
Initialization token
servers[x].specs
[]string
Server specifications
auth
string
Yes
API token
Content-type
string
Yes
Must be application/json
server_name
string
Yes
Server name
code
int
Status code
creation_completed
bool
Is server creation complete
config
[]string
Config of server
config.name
string
User selected server name
config.connected
bool
Was the server ever connected to clore.ai
config.visibility
string
Visibility on marketplace
config.pricing
[]string
Price/day on-demand
config.spot_pricing
[]string
Minimal price/day to rent for on spot market
config.mrl
int
Maximum rental length in hours
config.online
bool
Is server online
config.initialized
bool
Was the server ever connected to clore.ai
config.id
int
Unique server ID
config.rental_status
int
0 - not rented | 1 - Rented on spot market | 2 - Rented On Demand
config.specs
[]string
Server specifications
config.background_job
[]string
Background job when not rented
auth
string
Yes
API token
code
int
Status code
my_servers
[]string
Array of server ids you are providing to clore.ai (can't be rented)
servers
[]string
Array of public servers on marketplace
servers[x].id
int
Unique server ID
servers[x].owner
int
Unique owner ID
servers[x].mrl
int
Maximum rental length in hours
servers[x].price.on_demand
[]string
On demand price per day
servers[x].spot
[]string
Minimal spot market price per day
servers[x].rented
bool
Is server rented on demand
servers[x].specs
[]string
Server specifications
auth
string
Yes
API token
return_completed
bool
No
Return completed (expired) orders
code
int
Status code
limit
int
Maximum count of active orders
orders
[]string
Array of orders
orders[x].id
int
Unique order ID
orders[x].fee
float
Fee (%) paid to clore.ai
orders[x].creation_fee
float
Creation fee paid to clore.ai
orders[x].price
float
Order price (cost) per day
orders[x].mrl
int
Maximum order rental length in seconds
orders[x].image
string
Used docker image
orders[x].currency
string
Currency used for billing
orders[x].spend
float
Money spend on the order
orders[x].ct
int
Creation time (UNIX time)
orders[x].p
int
Currently used proxy cluster
orders[x].specs
[]string
Server specifications
orders[x].si
int
Unique server ID
orders[x].pub_cluster
[]string
Public endpoints with forwarded ports
orders[x].tcp_ports
[]string
TCP port forwarding
orders[x].http_port
string
Container port forwarded through HTTPS proxy
orders[x].spot
bool
Indication that it is spot order
orders[x].expired
bool
Indication that the order has expired
auth
string
Yes
API token
market
int
Yes
Unique server ID
code
int
Status code
exists
bool
Verification that the market exists
market
object
Marketplace
market.offers
array
Rental offers for the server
market.offers[x].offer_id
int
Unique offer ID
market.offers[x].bid
float
Offered price per day
market.offers[x].active
bool
This offer is currently used
market.offers[x].my
bool
This offer is owned by me
market.server
object
Server information
market.server.min_pricing
object
Minimal offer price per day
market.server.mrl
int
Maximum rental length in seconds
market.server.visibility
string
You can create offers only when visibility is public
market.server.online
bool
Server is online
auth
string
Yes
API token
Content-type
string
Yes
Must be application/json
name
string
Yes
User selected server name
availability
bool
Yes
Can server be rented
mrl
int
Yes
Maximum server rental length
on_demand
float
Yes
Price per day for your server on demand
spot
float
Yes
Minimum price per day for SPOT offer
code
int
Status code
auth
string
Yes
API token
Content-type
string
Yes
Must be application/json
order_id
int
Yes
Unique offer ID
desired_price
float
Yes
Your offered price per day
code
int
Status code
error
string
Error description field
max_step
float
Lowest possible value to what you can currently lower price
code
int
Status code
error
string
Error description field
time_to_lowering
float
Remaining time (sec) to next possibility to lower price
auth
string
Yes
API token
Content-type
string
Yes
Must be application/json
id
int
Yes
Unique order/offer ID
issue
string
No
If you have encountered any issues with the server you can report them to clore.ai team, maximum 2048 characters
code
int
Status code
auth
string
Yes
API token
Content-type
string
Yes
Must be application/json
currency
string
Yes
Currency name
image
string
Yes
Valid image from dockerhub
renting_server
int
Yes
ID of server you want to rent
type
string
Yes
on-demand
OR spot
spotprice
float
Depends
Offering price per day on spot market, required when making spot order
ports
object
No
Port forwarding configuration, max 5 records
env
object
No
Environment variables, limited to 12000 characters in total when stringified. Variable name - 128 symbols max Variable value - 1536 symbols max
jupyter_token
string
No
Jupyter token for images that has jupyter notebooks, maximum 32 characters *
ssh_key
string
No
SSH key for images with SSH, maximum 3072 characters *
ssh_password
string
No
SSH password for images with SSH, maximum 32 characters *
command
string
No
Command will be run on server after order creation
required_price
float
No
Specify price for what you want to start the order, if machine owner changes the price, then order will not start (on demand only)
autossh_entrypoint
bool
No
Use clore.ai entrypoint, that autometically deploy SSH server and custom /root/onstart.sh
script
code
int
Status code