Skip to content
qgonDEV DOCSSDK 0.3.31
ENKR

REST API

In the appSettings › API credentials

Read this page to get a token with an API key and call the qgon API from a program outside the server. It also covers how to read errors and what the external access level blocks. The full list of public paths is at the bottom.

All HTTP traffic to the server comes in through one web port. Examples always start from a single server address variable. The web port is set at install time, and the default is 2551.

BASE="http://<server address>:<web port>"
Path What it is Credential
/qgon-api/… The qgon API: experiments, datasets, models, test serving, endpoints, queues and more Token
/serve/<serving id>/… The test API Personal key
/endpoints/<name>/… Endpoint calls Endpoint key, personal key
/files/… Model and artifact file downloads Token

Call the REST API from a PC or server outside the server. Code inside workspaces and training jobs uses the SDK. From there, test APIs and endpoints are called at the in-server address the server sets up in advance (http://qdix-gateway:82). The path tails are the same as in the table above.

There are several kinds of keys, and they are easy to mix up. Here they are by where the REST API uses them.

Key Where to create it Where REST uses it
API key (access/secret) Settings › API credentials Get a token, then call /qgon-api and /files
Personal key (qgk_…) Deploy › Playground › API usage Test APIs, and endpoints within their scope
Endpoint key (qge_…) Deploy › Endpoints › endpoint details › Keys That endpoint
Workspace key Set up access in a workspace Not for REST. Only for the SDK inside the workspace

The qgon app in the browser calls the same API with a sign-in cookie. Programs use a token obtained with an API key. A token carries the full permissions of the key's owner. A token from an admin's key can do admin actions too.

  1. Create an API key in Settings › API credentials. The secret key is shown only once at creation, so copy it right away.
  2. Send the API key to the engine API POST /api/auth.login with HTTP Basic authentication. The access key goes in the user name and the secret key in the password. data.token in the response is the token.
  3. Add the Authorization: Bearer <token> header when you call the qgon API.
The API credentials screen in settings, with my API credentials and the New credentials button
Type a label in the box at the top right and press New credentials. The secret key is shown only once, at creation.View full size(opens in a new tab)
BASE="http://<server address>:<web port>"
ACCESS_KEY="…" # key created in Settings › API credentials
SECRET_KEY="…"
TOKEN=$(curl -s -X POST -u "$ACCESS_KEY:$SECRET_KEY" "$BASE/api/auth.login" \
| python3 -c 'import sys, json; print(json.load(sys.stdin)["data"]["token"])')
curl -H "Authorization: Bearer $TOKEN" "$BASE/qgon-api/me"
curl -H "Authorization: Bearer $TOKEN" "$BASE/qgon-api/experiments?mine=1&status=completed"

When a token expires you get 401; get a new token then. Revoking a key does not end tokens already issued with it: they keep working until they expire (30 days by default). If a key or token leaked, revoke the key and tell your admin.

The error body shape depends on the path.

Path Error body
/qgon-api/… {"detail": "<message in Korean>", "code": "<error code>", "request_id": "<request number>"}. Some errors have no code
/qgon-api/… input validation (422) The default validation error, where detail is an array. The text is in English
/serve/…, /endpoints/… The OpenAI shape {"error": {"message", "type", "code"}}

Programs should branch on the HTTP status and code, not on the message. Messages are meant for people and may change.

Every response carries an X-Request-Id header. The request_id in /qgon-api error bodies is the same value. When you report a problem to the admin, include this number so the admin can find the same request in the action log and the service logs.

Common statuses:

Status Meaning
401 The token or key is missing or expired
403 Not allowed. A code of lan_only means the action works only from the LAN, and external_denied means the external access level blocked it
404 The target does not exist, or you cannot see it
409 The request does not fit the current state (already done, for example)
413 The body is too large. Most /qgon-api bodies are capped at 4 MB. Send large files in chunks through the upload paths
429 Too many requests. If there is a Retry-After header, wait that long

The server does not send CORS headers. A web app hosted on another site cannot call the qgon API straight from the browser, and the server rejects state-changing requests from another origin with 403. To use the API from a web app, call it from the app's server side. Programs that send no Origin header (curl, Python and so on) are not affected.

The server decides from the client address whether a request came from the LAN or from outside. Requests from the LAN have no limits. Requests from outside follow the external access level the admin set.

External access level What works from outside the server
Blocked Nothing. Even getting a token is blocked
Read-only Reading (GET), file downloads, and read actions such as marking notifications read
Read + basic actions Read-only plus the groups the admin picked (Stop · start/stop, Run again, Workspace members)
Full access Everything except LAN-only actions. Test API and endpoint calls work only at this level

At any level, LAN-only actions are blocked from outside with 403 lan_only. These include the paths whose auth column reads Signed-in, LAN only in the list below (creating and deleting personal keys, issuing endpoint keys, saving and changing import tokens), and admin actions such as account, team and security settings. Even at Full access, an endpoint cannot be called from outside unless its Allow calls from outside setting is on.

To see how your own connection is classified, call GET /qgon-api/access/me. Setting the level is covered in Security and access.

These are the public paths that server users can call. Admin-only paths and paths used only by the app screens are left out. In the auth column, Signed-in means an app sign-in or a token obtained with an API key. Replace each {…} in a path with the matching id or name.

Auth & account

Get a token and manage your account and keys. Only the token request is an engine API (/api) path; the rest are qgon API.

RequestWhat it doesAuth
POST/api/auth.loginExchange an API key for a tokenEngine API. Use data.token from the response as Authorization: Bearer.API key (Basic)
GET/qgon-api/meMy account, role, teams, workspace summary and SSH keysSigned-in
GET/qgon-api/access/meWhether I connect from the LAN or outside, and the external access levelSigned-in
GET/qgon-api/credentialsList my API keys (no secrets)Signed-in
POST/qgon-api/credentialsCreate an API keysecret_key appears only in this response. The device addresses (api_server, files_server) come with it.Signed-in
DELETE/qgon-api/credentials/{access_key}Revoke an API keySigned-in
POST/qgon-api/keysAdd an SSH public keyBody {key, name?}. Used for SSH into workspaces.Signed-in
DELETE/qgon-api/keys/{key_id}Remove an SSH public keySigned-in
GET/qgon-api/account/proxy-keysList keys kept for automatic requeueThe key values are never shown.Signed-in
DELETE/qgon-api/account/proxy-keys/{key_id}Revoke a key kept for automatic requeueSigned-in
GET/qgon-api/me/activityMy action logPage with cursor (next_cursor in the response).Signed-in

Starter templates

Browse starter templates and copy one into your workspace.

RequestWhat it doesAuth
GET/qgon-api/templatesList starter templates and whether they are readySigned-in
GET/qgon-api/templates/{template_id}Template details (settings, license, code preview)Signed-in
POST/qgon-api/templates/{template_id}/copyCopy into my workspaceBody {workspace, preset?}. Use copy_id from the response to check the result.Signed-in
GET/qgon-api/templates/copies/{copy_id}Result of a copySigned-in

Datasets

List dataset versions, and mount or unmount them.

RequestWhat it doesAuth
GET/qgon-api/datasetsList datasetsSigned-in
GET/qgon-api/datasets/version/{task_id}Dataset version details (lineage, files, label distribution)Signed-in
GET/qgon-api/datasets/materializedMounted versions, with disk usageSigned-in
GET/qgon-api/datasets/{version_id}/materializeMount state of one versionSigned-in
POST/qgon-api/datasets/{version_id}/materializeRequest a mount202 means queued; 200 means it is already mounted.Signed-in
DELETE/qgon-api/datasets/{version_id}/materializeUnmount (the source dataset stays)Signed-in

Uploads

The resumable upload sessions the browser uses. Upload in chunks, inspect, then commit a new dataset version.

RequestWhat it doesAuth
GET/qgon-api/uploads/meWhether I can upload now, and the limitsSigned-in
POST/qgon-api/uploadsCreate a resumable upload sessionSigned-in
POST/qgon-api/uploads/{upload_id}/manifestSend the next part of the file listSigned-in
PATCH/qgon-api/uploads/{upload_id}Upload a chunkContent-Type application/offset+octet-stream with an Upload-Offset header. Use HEAD to read the current offset.Signed-in
GET/qgon-api/uploads/{upload_id}Session stateSigned-in
DELETE/qgon-api/uploads/{upload_id}Cancel the upload (received data is deleted)Signed-in
GET/qgon-api/uploadsList my upload sessionsSigned-in
POST/qgon-api/dataset-uploads/{upload_id}/inspectStart inspecting the uploaded filesSigned-in
GET/qgon-api/dataset-uploadsList my dataset upload jobsSigned-in
GET/qgon-api/dataset-uploads/{upload_id}Inspection report and suggested valuesSigned-in
GET/qgon-api/dataset-uploads/{upload_id}/preview/{n}Sample thumbnail (JPEG)Signed-in
POST/qgon-api/dataset-uploads/{upload_id}/commitCommit a new dataset versionSigned-in
POST/qgon-api/dataset-uploads/{upload_id}/cancelCancel the upload jobSigned-in

Data Explorer

Index a dataset version and browse samples and distributions. Save a filtered view as a new version.

RequestWhat it doesAuth
GET/qgon-api/explorer/statusIndex state of several versionsSigned-in
GET/qgon-api/explorer/versions/{version_id}/statusIndex state and progress of one versionSigned-in
POST/qgon-api/explorer/versions/{version_id}/indexStart indexingSigned-in
GET/qgon-api/explorer/versions/{version_id}/samplesList samples (filter, sort, cursor)Signed-in
GET/qgon-api/explorer/versions/{version_id}/samples/{sample_id}Sample detailsSigned-in
GET/qgon-api/explorer/versions/{version_id}/samples/{sample_id}/thumbSample thumbnail (JPEG)Signed-in
GET/qgon-api/explorer/versions/{version_id}/samples/{sample_id}/previewSample preview (JPEG)Signed-in
GET/qgon-api/explorer/versions/{version_id}/samples/{sample_id}/annotations/{annotation_id}/maskSegmentation mask (PNG)Signed-in
GET/qgon-api/explorer/versions/{version_id}/statsLabel and split distribution, metadata rangesSigned-in
GET/qgon-api/explorer/compareCompare two versionsSigned-in
POST/qgon-api/explorer/versions/{version_id}/saveSave the filtered samples as a new dataset versionSigned-in

Imports

Bring Hugging Face models and datasets and Git code onto the device. Saving or changing tokens works only from the LAN.

RequestWhat it doesAuth
GET/qgon-api/imports/optionsImport sources, limits and policySigned-in
POST/qgon-api/imports/inspectInspect what would be importedStart the import with inspect_id from the response.Signed-in
GET/qgon-api/imports/lookupFind something already importedSigned-in
POST/qgon-api/importsStart an importSigned-in
GET/qgon-api/importsList importsSigned-in
GET/qgon-api/imports/{import_id}Import details and progressSigned-in
POST/qgon-api/imports/{import_id}/cancelCancel an importSigned-in
POST/qgon-api/imports/{import_id}/retryRetry an importSigned-in
DELETE/qgon-api/imports/{import_id}/modelDelete an imported modelRefused while something uses it.Signed-in
GET/qgon-api/account/import-credentialsList my import tokens (no values)Signed-in
POST/qgon-api/account/import-credentialsSave a Hugging Face or Git tokenSigned-in, LAN only
PUT/qgon-api/account/import-credentials/{credential_id}Replace a tokenSigned-in, LAN only
DELETE/qgon-api/account/import-credentials/{credential_id}Delete a tokenSigned-in, LAN only
POST/qgon-api/account/import-credentials/{credential_id}/testTest a tokenSigned-in

Experiments

Read experiment lists, summaries, logs, curves, comparisons and lineage. The SDK writes the records.

RequestWhat it doesAuth
GET/qgon-api/experimentsList experimentsFilter with project, mine, status, q and days.Signed-in
GET/qgon-api/experiments/{task_id}/childrenTrials or steps under a controllerSigned-in
GET/qgon-api/experiments/{task_id}/summaryExperiment summary (key metric, all metrics, settings, environment, lineage)Signed-in
GET/qgon-api/experiments/{task_id}/logConsole logSigned-in
GET/qgon-api/experiments/{task_id}/scalarsScalar curvesmetric may be repeated.Signed-in
GET/qgon-api/experiments/{task_id}/filesOutput files and artifactsSigned-in
PUT/qgon-api/projects/{project_id}/primary-metricRemember my key metric for a projectSigned-in
POST/qgon-api/compareCompare runs (2 to 20)Signed-in
GET/qgon-api/compare/exportExport the comparison table (CSV, LaTeX, Markdown)Signed-in
GET/qgon-api/lineageLineage graphkind is one of dataset_version, run or model.Signed-in

Runs & checkpoints

Start a run from workspace code, rerun it, and resume from a checkpoint.

RequestWhat it doesAuth
POST/qgon-api/runsStart a run from workspace codeYou must be a member of the workspace and have finished access setup.Signed-in
POST/qgon-api/runs/{task_id}/rerunRerun with the same settingsSigned-in
GET/qgon-api/experiments/{task_id}/checkpointsList an experiment's checkpointsSigned-in
PUT/qgon-api/experiments/{task_id}/checkpoints/{model_id}/pinPin a checkpointSigned-in
POST/qgon-api/experiments/{task_id}/checkpoints/deleteDelete checkpoints (to trash)Without confirm it only previews.Signed-in
POST/qgon-api/experiments/{task_id}/checkpoints/restoreRestore from trashSigned-in
POST/qgon-api/experiments/{task_id}/resumeResume from a checkpointSigned-in

Queue & dispatch

Queue order, urgent requests, GPU yield and dispatch status. Inside a workspace the SDK (qgon.queue) can call this group too. Admin moves such as top and bottom do not work with a workspace key.

RequestWhat it doesAuth
GET/qgon-api/queues/{name}/orderQueue orderMembers do not see other people's job names.Signed-in or workspace key
POST/qgon-api/queues/{name}/moveMove a waiting jobaction is up, down, top or bottom. top and bottom are admin only.Signed-in or workspace key
GET/qgon-api/queues/urgent-requestsList urgent requestsSigned-in or workspace key
POST/qgon-api/queues/urgent-requestsSend an urgent requestSigned-in or workspace key
POST/qgon-api/queues/urgent-requests/{urgent_id}/cancelCancel my urgent requestSigned-in or workspace key
GET/qgon-api/dispatch/statusDispatch state, free memory and wait reasonsSigned-in or workspace key
POST/qgon-api/dispatch/requeue/{task_id}Requeue a stopped jobSigned-in
POST/qgon-api/dispatch/yield/{task_id}Ask a job to yield its GPUSigned-in or workspace key
DELETE/qgon-api/dispatch/yield/{task_id}Cancel a yield requestSigned-in or workspace key

LLM fine-tuning

Everything the fine-tuning studio does: data check, estimate, start, stop, resume and merge.

RequestWhat it doesAuth
GET/qgon-api/finetune/optionsReadiness, base model candidates and limitsSigned-in
GET/qgon-api/finetune/datasets/{version_id}/filesTraining files in a mounted version (.jsonl, .json)Signed-in
POST/qgon-api/finetune/dataset-checkCheck data format, errors and length distributionSigned-in
POST/qgon-api/finetune/estimateEstimate memory and stepsSigned-in
POST/qgon-api/finetune/runsStart fine-tuningSigned-in
GET/qgon-api/finetune/runsList fine-tuning and merge runsSigned-in
GET/qgon-api/finetune/runs/{task_id}Fine-tuning details (settings, progress, loss, before/after samples)Signed-in
POST/qgon-api/finetune/runs/{task_id}/stopStopSigned-in
POST/qgon-api/finetune/runs/{task_id}/resumeResumeSigned-in
POST/qgon-api/finetune/runs/{task_id}/mergeBuild a merged modelSigned-in

Models

List and publish models. Download model files from the /files links in the list.

RequestWhat it doesAuth
GET/qgon-api/modelsList models (with key metric and download link)Signed-in
POST/qgon-api/models/{model_id}/publishPublish a modelModel author (or the author of the run that made it) and admins.Signed-in
GET/files/{path}Download a model or artifact fileUse the link from the model list as is. Uploads go through the SDK.Signed-in

Test serving

Start, stop and configure Playground test servings. Personal keys (qgk_) are created here too.

RequestWhat it doesAuth
GET/qgon-api/servingMy test servings and shared ones I can useSigned-in
GET/qgon-api/serving/modelsModels that can be startedSigned-in
GET/qgon-api/serving/estimateFormat check, reserved memory and whether it can start nowSigned-in
GET/qgon-api/serving/predict-defaultsDefaults for starting with custom inference codeFills in workspace, code folder, entry file and environment version from the run that made the model.Signed-in
POST/qgon-api/servingStart a test servingReturns 202 at once. Poll GET /qgon-api/serving/{serving_id} for state.Signed-in
GET/qgon-api/serving/{serving_id}Test serving state and model nameSigned-in
PUT/qgon-api/serving/{serving_id}Change sharing and idle timeSigned-in
GET/qgon-api/serving/{serving_id}/logsEngine logStarter and admins only.Signed-in
POST/qgon-api/serving/{serving_id}/stopStop a test servingSigned-in
GET/qgon-api/account/serve-keysList my personal keysSigned-in
POST/qgon-api/account/serve-keysCreate a personal keyThe key value appears only in this response.Signed-in, LAN only
DELETE/qgon-api/account/serve-keys/{key_id}Delete a personal key (blocked at once)Signed-in, LAN only

Test API calls

Addresses for calling one test serving. They sit right under the device address at /serve/<serving id>, not under /qgon-api, and errors use the OpenAI shape ({error:{message, type, code}}). LLMs use the /v1 paths; custom inference code uses predict, info and cancel.

RequestWhat it doesAuth
GET/serve/{serving_id}/v1/modelsModel list (to find the model value)Personal key or signed-in
POST/serve/{serving_id}/v1/chat/completionsChat (OpenAI compatible)With stream it returns SSE. Body up to 4 MB.Personal key or signed-in
POST/serve/{serving_id}/v1/completionsText completion (OpenAI compatible)Personal key or signed-in
POST/serve/{serving_id}/v1/embeddingsEmbeddings (OpenAI compatible)Personal key or signed-in
GET/serve/{serving_id}/healthEngine healthPersonal key or signed-in
POST/serve/{serving_id}/predictCall custom inference codemultipart image (several allowed) or JSON {image | images | table, params}. Body up to 12 MB.Personal key or signed-in
GET/serve/{serving_id}/infoInput kind, classes and limitsPersonal key or signed-in
POST/serve/{serving_id}/cancelCancel the running requestThe requester, the starter or an admin.Personal key or signed-in

Endpoint management

Create, stop, restart and delete endpoints and issue endpoint keys (qge_). Admins, the team lead and the creator manage them.

RequestWhat it doesAuth
GET/qgon-api/endpointsList endpoints and device limitsSigned-in
POST/qgon-api/endpointsCreate an endpointfrom_serving (promote a test serving) or spec (LLM model directly). Returns 202.Signed-in
GET/qgon-api/endpoints/{name}Endpoint details (address, state, reservation)404 if you cannot see it.Signed-in
PATCH/qgon-api/endpoints/{name}Change title, description, scope or outside callsWidening the scope needs confirm: true.Signed-in
DELETE/qgon-api/endpoints/{name}Delete an endpoint?confirm=<name>. Keys are revoked and the name stays reserved for 30 days.Signed-in
GET/qgon-api/endpoints/{name}/revisionsList versionsSigned-in
POST/qgon-api/endpoints/{name}/stopStopBody {confirm: <name>}.Signed-in
POST/qgon-api/endpoints/{name}/startStart againSigned-in
GET/qgon-api/endpoints/{name}/eventsEvent historySigned-in
GET/qgon-api/endpoints/{name}/logsEngine logManagers only.Signed-in
GET/qgon-api/endpoints/{name}/keysList endpoint keys (no values)Signed-in
POST/qgon-api/endpoints/{name}/keysIssue an endpoint keyBody {name?, expires_days?, rpm_limit?}. The key value appears only in this response.Signed-in, LAN only
DELETE/qgon-api/endpoints/{name}/keys/{key_id}Revoke an endpoint keySigned-in

Endpoint calls

The production address, called by name. The paths match the test API, and for LLMs the model value is the endpoint name. While recovering it returns 503 with Retry-After.

RequestWhat it doesAuth
GET/endpoints/{name}/v1/modelsModel list (model = endpoint name)Endpoint key, personal key or signed-in
POST/endpoints/{name}/v1/chat/completionsChat (OpenAI compatible)Endpoint key, personal key or signed-in
POST/endpoints/{name}/v1/completionsText completion (OpenAI compatible)Endpoint key, personal key or signed-in
POST/endpoints/{name}/v1/embeddingsEmbeddings (OpenAI compatible)Endpoint key, personal key or signed-in
GET/endpoints/{name}/healthHealth checkEndpoint key, personal key or signed-in
POST/endpoints/{name}/predictCall custom inference code (same input as the test API predict)Endpoint key, personal key or signed-in
GET/endpoints/{name}/infoInput kind, classes and limitsEndpoint key, personal key or signed-in
POST/endpoints/{name}/cancelCancel the running requestEndpoint key, personal key or signed-in

Workspaces & environments

Start and stop your workspaces and list saved environment versions. Creating, deleting and member management are admin tasks and are not listed here.

RequestWhat it doesAuth
GET/qgon-api/workspacesList my workspacesSigned-in
GET/qgon-api/workspaces/{name}Workspace detailsSigned-in
POST/qgon-api/workspaces/{name}/startStartSigned-in
POST/qgon-api/workspaces/{name}/stopStopSigned-in
GET/qgon-api/workspaces/{name}/logsStartup logSigned-in
GET/qgon-api/workspaces/{name}/jobsExperiments sent from this workspaceSigned-in
GET/qgon-api/workspaces/{name}/envList environment versionsSigned-in
GET/qgon-api/task-envsEnvironment versions I can train withSigned-in
GET/qgon-api/envsEnvironment versions across workspacesSigned-in
GET/qgon-api/shared-envsList shared environmentsSigned-in

Teams, resources & storage

Read team and pool quotas, GPU usage and storage usage.

RequestWhat it doesAuth
GET/qgon-api/teamsList teams (your own unless admin)Signed-in
GET/qgon-api/teams/{team}Team details (members, quotas, limits)Signed-in
GET/qgon-api/poolsPools with my teams' limits and usageSigned-in
GET/qgon-api/resourcesDevice and GPU metrics, jobs per poolSigned-in
GET/qgon-api/usageGPU hours useddays and group (user or project).Signed-in
GET/qgon-api/gpu/usageDevice memory and what is using the GPU nowSigned-in
GET/qgon-api/gpu/usage/task/{task_id}Peak and last GPU memory for a jobSigned-in
GET/qgon-api/storage/usageMy storage usageSigned-in
GET/qgon-api/projects/{project_id}/storageProject storage (largest experiments first)Signed-in
GET/qgon-api/storage/summaryDevice storage summarySigned-in

Notifications

Read your notifications and turn each kind on or off.

RequestWhat it doesAuth
GET/qgon-api/notificationsMy notificationsSigned-in
POST/qgon-api/notifications/readMark as read{ids: […]} or {all: true}.Signed-in
GET/qgon-api/notifications/settingsNotification settings by kindSigned-in
PUT/qgon-api/notifications/settingsChange notification settingsSigned-in