curl --request POST \
--url https://api.cycls.ai/v1/deploy \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-Key: <api-key>' \
--form 'function_name=<string>' \
--form port=8080 \
--form memory=1Gi \
--form 'source_archive=<string>' \
--form 'source_object=<string>' \
--form session_affinity=false \
--form use_http2=false \
--form timeout=600 \
--form cpu=1 \
--form concurrency=80 \
--form max_instances=0 \
--form 'volumes=<string>' \
--form schedule= \
--form timezone= \
--form source_archive.0='@example-file'import requests
url = "https://api.cycls.ai/v1/deploy"
files = { "source_archive.0": ("example-file", open("example-file", "rb")) }
payload = {
"function_name": "<string>",
"port": "8080",
"memory": "1Gi",
"source_archive": "<string>",
"source_object": "<string>",
"session_affinity": "false",
"use_http2": "false",
"timeout": "600",
"cpu": "1",
"concurrency": "80",
"max_instances": "0",
"volumes": "<string>",
"schedule": "",
"timezone": ""
}
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('function_name', '<string>');
form.append('port', '8080');
form.append('memory', '1Gi');
form.append('source_archive', '<string>');
form.append('source_object', '<string>');
form.append('session_affinity', 'false');
form.append('use_http2', 'false');
form.append('timeout', '600');
form.append('cpu', '1');
form.append('concurrency', '80');
form.append('max_instances', '0');
form.append('volumes', '<string>');
form.append('schedule', '');
form.append('timezone', '');
form.append('source_archive.0', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
options.body = form;
fetch('https://api.cycls.ai/v1/deploy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Deploy
Deploy a service. Returns NDJSON stream with progress updates.
Post the source as source_archive, the tar.gz, up to 100 MiB. Ship
large files via volumes (cycls volume put), not the source archive.
timeout is how long a single request to the deployed service may run
raise it for long compute, up to Cloud Run’s 3600s ceiling. cpu is raised
automatically if memory requires more than you asked for.
concurrency is how many requests one instance serves at once. Leave it high
for I/O-bound apps; set it to 1 for compute, so each call gets its own instance.
max_instances caps how many instances the service may scale to. 0 (default)
leaves scaling to the platform.
volumes maps mount paths to volumes (JSON), e.g. {"/data": "shared"} or
{"/data": {"name": "shared", "read_only": true, "sub_path": "v1"}}.
Required, {} declares no storage; the deploy is a complete declaration.
Unknown volumes are created (announced in the stream).
schedule fires the deployed function on a cron: {"cron": "0 3 * * *", "timezone": "Asia/Riyadh"}. Empty or omitted removes any schedule, the
same complete-declaration rule.
Events: BUILDING → DEPLOYING → DONE (or ERROR)
curl --request POST \
--url https://api.cycls.ai/v1/deploy \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-Key: <api-key>' \
--form 'function_name=<string>' \
--form port=8080 \
--form memory=1Gi \
--form 'source_archive=<string>' \
--form 'source_object=<string>' \
--form session_affinity=false \
--form use_http2=false \
--form timeout=600 \
--form cpu=1 \
--form concurrency=80 \
--form max_instances=0 \
--form 'volumes=<string>' \
--form schedule= \
--form timezone= \
--form source_archive.0='@example-file'import requests
url = "https://api.cycls.ai/v1/deploy"
files = { "source_archive.0": ("example-file", open("example-file", "rb")) }
payload = {
"function_name": "<string>",
"port": "8080",
"memory": "1Gi",
"source_archive": "<string>",
"source_object": "<string>",
"session_affinity": "false",
"use_http2": "false",
"timeout": "600",
"cpu": "1",
"concurrency": "80",
"max_instances": "0",
"volumes": "<string>",
"schedule": "",
"timezone": ""
}
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('function_name', '<string>');
form.append('port', '8080');
form.append('memory', '1Gi');
form.append('source_archive', '<string>');
form.append('source_object', '<string>');
form.append('session_affinity', 'false');
form.append('use_http2', 'false');
form.append('timeout', '600');
form.append('cpu', '1');
form.append('concurrency', '80');
form.append('max_instances', '0');
form.append('volumes', '<string>');
form.append('schedule', '');
form.append('timezone', '');
form.append('source_archive.0', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
options.body = form;
fetch('https://api.cycls.ai/v1/deploy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Your Cycls API key, from https://cloud.cycls.com. Sent as the X-API-Key header. This is the CYCLS_API_KEY the CLI uses.
Body
1 <= x <= 36001 <= x <= 10000 <= x <= 1000Response
NDJSON stream of deployment progress