Create Deployments with Nosana API
Less than 1 minute
Create Deployments with Nosana API
Call Nosana's REST API directly using your API key for deployment management and credit operations.
Get an API Key
You can create an API key from the Nosana dashboard.
- Log in at
https://dashboard.nosana.com - Go to
Account - Find the
API Keyssection - Click
Create Key


API Examples
Create a deployment using credits
export NOSANA_API_KEY="nos_xxx_your_api_key"
curl -X POST "https://dashboard.k8s.prd.nos.ci/api/deployments/create" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $NOSANA_API_KEY" \
-d '{
"name": "Hello World",
"market": "7AtiXMSH6R1jjBxrcYjehCkkSF7zvYWte63gwEDBcGHq",
"timeout": 60,
"replicas": 1,
"strategy": "SIMPLE",
"job_definition": {
"version": "0.1",
"type": "container",
"meta": {
"trigger": "cli"
},
"ops": [
{
"type": "container/run",
"id": "hello-world",
"args": {
"cmd": ["echo hello world"],
"image": "ubuntu"
}
}
]
}
}'
You can find the available markets/GPUs in the Nosana dashboard
Start a deployment
After creating the deployment, you will need to start it.
curl -s \
-H "Authorization: Bearer $NOSANA_API_KEY" \
https://dashboard.k8s.prd.nos.ci/api/deployments/<deployment_id>/start | jq .
Retrieve deployments
List all deployments:
curl -s \
-H "Authorization: Bearer $NOSANA_API_KEY" \
https://dashboard.k8s.prd.nos.ci/api/deployments | jq .
Get a specific deployment:
curl -s \
-H "Authorization: Bearer $NOSANA_API_KEY" \
https://dashboard.k8s.prd.nos.ci/api/deployments/YOUR_DEPLOYMENT_ID | jq .
For all available deployment endpoints see the API reference.
Check credit balance
curl -s \
-H "Authorization: Bearer $NOSANA_API_KEY" \
https://dashboard.k8s.prd.nos.ci/api/credits/balance | jq .
Response:
{
"assignedCredits": 100.0,
"reservedCredits": 10.0,
"settledCredits": 5.0
}
Note: Available balance = assignedCredits - reservedCredits - settledCredits