Skip to main content

Dedicated Inference

General conventions​

  • Base URL: BASE_API_URL
  • Path: /bff/v1/ddi/{orgIdentifier}/workspaces/{workspaceIdentifier}/{action}
  • Method: All endpoints use POST.
  • Service-specific headers: X-Region: <region> (defaults to hanoi-vn if region is empty or all)
  • Common headers (apiClient): X-Org-Id, X-Workspace-Id, X-User-Id
  • Body: Always wrapped in payload: { "payload": { ... } }. Actions with no parameters send {}.
  • Response: { "data": <payload>, "meta": { trace_id, org_id, ws_id, region_code } }
  • Stream actions use fetch directly (not axios) with Accept: text/event-stream, credentials: include.

Endpoints​

Model catalog & HuggingFace​

#ActionPayloadPurpose
1ddi.model-catalog-list{ status: "active", query?, page?, page_size?, filters?: [{ column: "category_code", value }] }List model catalog
2ddi.model-catalog-category-list— ({})List categories
3ddi.model-catalog-get{ id }Model catalog details
4ddi.hf-model-search{ query?, pipeline_tag?, library?, sort?, limit?, cursor? }Search models on HuggingFace

Catalog for deploy form​

#ActionPayloadPurpose
5ddi.catalog-deploy-tiers-list—List tiers
6ddi.catalog-gpu-skus-list—List GPU SKUs
7ddi.catalog-runtime-images-list—List runtime images (templates)
8ddi.catalog-regions-list—List deploy regions

Endpoint​

#ActionPayloadPurpose
9ddi.endpoint-create{ body: IDeployEndpointPayloadBody }Deploy endpoint
10ddi.endpoint-list{ page, size, sort_by ("created_at"), sort_order ("asc") }List endpoints
11ddi.endpoint-get{ container_id }Endpoint details
12ddi.endpoint-start{ container_id }Start
13ddi.endpoint-stop{ container_id }Stop
14ddi.endpoint-restart{ container_id }Restart (also used for "retry")
15ddi.endpoint-delete{ container_id }Delete
16ddi.endpoint-logs{ container_id }Latest log snapshot (string[])
17ddi.endpoint-logs-stream{ container_id, container, follow: true, tail_lines }Log stream (SSE)
18ddi.endpoint-metrics-get{ endpoint_id, from, to, step_seconds? }Metric history
19ddi.endpoint-healthsummary-get{ endpoint_id, from?, to? }Health summary

Gateway API key​

#ActionPayloadPurpose
20ddi.gateway-api-key-list{ endpoint_id }List keys
21ddi.gateway-api-key-create{ endpoint_id, name, allowed_models[] }Create key (sk-vgw-*); endpoint must be running
22ddi.gateway-api-key-revoke{ endpoint_id, api_key_id }Revoke key

Playground​

#ActionPayloadPurpose
23ddi.playground-completion-send{ endpoint_id, system_prompt, messages[{role, content}], temperature, top_p, max_tokens, stream: false }Chat completion (non-streaming)
24ddi.playground-capabilities{ endpoint_id }Tasks supported by the endpoint
25ddi.playground-invoke{ endpoint_id, task, payload: {...} }Run a task
26ddi.playground-invoke-stream{ endpoint_id, task, payload: {...} }Run a task (stream, SSE)
27ddi.playground-job-get{ endpoint_id, generation_id }Get async job status
28ddi.playground-examples{ page, page_size }Example images for playground

Request body​

9. ddi.endpoint-create​

{
"payload": {
"body": {
"name": "my-endpoint",
"instance_type": "H100",
"container_group": "",
"purpose": "SERVICE",
"description": "",
"resource": { "cpu": 0, "ram": 0, "gpu": 1, "vram": 0, "temp_disk": 0, "gpu_type": "H100" },
"tags": { "is_ddi_container": true },
"container_settings": [{
"enable_ssh": false,
"authorized_keys": [],
"image_setting": { "image_url": "...", "image_tag": "latest", "image_user": "", "image_password": "", "fptcloud_official": true },
"volume_settings": [{ "volume_type": "TEMP_DISK", "mount_path": "/data", "resource": {}, "tags": { "is_ddi_container": true } }],
"advance_setting": {
"http_ports": [{ "container_port": 8000 }],
"tcp_ports": [],
"container_envs": [{ "key": "HF_TOKEN", "value": "..." }],
"startup_cmd": { "cmd": [], "args": [] },
"healthchecks": []
}
}]
}
}
}

25 / 26. ddi.playground-invoke(-stream)​

task ∈ chat, vision, embeddings, decision, t2i, iedit, i23d, t2s, t2m, t2v, asr, wm, v2v, icomp. The inner payload depends on the task — retrieve available tasks from ddi.playground-capabilities.

Responses​

ActionResponse (data)
ddi.model-catalog-list{ items: [{ id, hf_model_id, display_name, short_description, parameters_display, context_length_display, license, badge_code, sort_order, status_code, categories[], provider_name, from_price, image_url, created_at, updated_at }], total, page, page_size }
ddi.model-catalog-category-list{ items: [{ code, display_name, sort_order, created_at }] }
ddi.model-catalog-getSame as catalog item + benchmarks[], hardware_profiles[], cache_profiles[], custom_config, suggest_engine
ddi.hf-model-search{ items: [{ id, author, hf_url, downloads, likes, pipeline_tag, library_name, tags[], gated (none|auto|manual), params, last_modified, created_at, deployable{status (compatible|incompatible|unverified), reason, runtime_hint (vllm|diffusers)} }], next_cursor, stale }
ddi.catalog-deploy-tiers-list{ items: [{ id, name, gpuLabel, gpuOptionId, replicas, autoscale, concurrentUsers, tokensPerSecond, pricePerHour }] }
ddi.catalog-gpu-skus-list{ items: [{ gpu_sku_code, display_name, gpu_model, vram_gb, gpus_per_node, regions[], status, hourly_price{amount_micros, currency, display}, max_gpus_per_request, flavor, resource, price{estimate, currency_code}, available }] }
ddi.catalog-runtime-images-list{ items: [{ runtime_image_id, runtime_engine, image, tag, digest, status, default }] }
ddi.catalog-regions-list{ items: [{ region_code, display_name, status }] }
ddi.endpoint-list{ items: Endpoint[], total, page, size, sort_by, sort_order }; Endpoint: id, name, status, instance_type, purpose, container_group, tenant_id, endpoint_id, container_settings[{ image_setting, advance_setting{ startup_cmd, http_ports[{container_port, domain_name, name, status}], container_envs } }], billing_plan{billing_type, billing_level, cost_estimate, currency_code}, created_at, updated_at, created_by_email
ddi.endpoint-getEndpoint + description, deleted, version, org_id, ws_id
ddi.endpoint-logsstring[] (raw log lines)
ddi.endpoint-metrics-get{ points: [{ bucket_start, request_count, rpm, error_count, error_rate, prompt_tokens, completion_tokens, total_tokens, avg_latency_ms, avg_ttft_ms, ttft_p50/p95/p99_ms, latency_p50/p95/p99_ms, tokens_per_second }], available_from, summary{ request_count, throughput_per_sec, p99_latency_ms }, step_seconds, source (playground|scrape) }
ddi.endpoint-healthsummary-get{ status, uptime_30d_pct, uptime_30d_tracked, last_check_at, auto_recoveries_30d, auto_recoveries_tracked, mttr_seconds_avg_30d, mttr_tracked, metrics_supported }
ddi.gateway-api-key-list{ items: [{ id, name, key_prefix (masked), status, created_at, revoked_at }] }
ddi.gateway-api-key-create{ api_key_id, key, name, created_at } (key is secret, shown only once)
ddi.playground-completion-send{ text, latencyMs, promptTokens, completionTokens, cost }
ddi.playground-capabilities{ engine, models[], served_model, supported_tasks: [{ id, input (text|image|audio|video), output (text|image|audio|video|vector|3d), enabled, streamable, reason }] }
ddi.playground-job-get{ id, status (queued|running|succeeded|failed|unknown), result{ url, format, bytes }, error (string or {code, message}), timings }
ddi.playground-examples{ items: [{ id, image_url }], total, page, page_size }
start / stop / restart / delete / create / revokeNo response body used.

Enums​

  • Endpoint status: CREATING, RUNNING, STOPPED, PROCESSING, FAILED, DELETING, DELETED
  • purpose: SERVICE
  • ddi.endpoint-metrics-get.source: playground (metrics from playground), scrape (Prometheus from container)

Notes​

  • Log stream (ddi.endpoint-logs-stream): SSE; each batch { event: "log_lines" | "stream_ended", batch_seq, container_id, container, lines[] }.
  • Playground stream (ddi.playground-invoke-stream): SSE; errors return JSON { detail | error | message }.
  • scaleEndpoint and updateEndpointModel currently have no BFF (FE uses no-op).
  • Serverless Inference docs: docs/serverless-inference/api-endpoints.md.

Error codes​

Error format​

On error, HTTP status ≠ 2xx and the body has the following shape:

{ "code": "SI-KEYS-00004", "message": "...", "params": { "field": "name" }, "role_based": false, "statusCode": 400 }
  • role_based: true — the error message depends on the caller's role (MANAGEMENT / WS_ADMIN / MEMBER) and params.quotaLevel.
  • HTTP 401 — the client logs out.

Common error codes (billing / quota / gateway)​

CodeMeaning
INSUFFICIENT_BALANCEInsufficient credits (role-based). Role MANAGEMENT auto-opens the top-up modal.
INSUFFICIENT_PERMISSIONSThe caller does not have permission to perform this action.
EQ-RESOURCE-00001Quota reached (role-based, per params.quotaLevel: Organization / Workspace / Service).
EQ-RESOURCE-SYSTEM-LIMITResource quota reached (params.name).
BFF-CREATING-CONCURRENCYAnother resource is being created in this workspace/service.
route_not_foundEndpoint does not exist.
method_not_allowedWrong method. Only POST is accepted.
request_too_largeBody exceeds 64 KB.
invalid_tokenToken is invalid or expired.
gateway_internal_errorInternal gateway error.
upstream_unavailableBackend service is temporarily unavailable.
gateway_timeoutBackend service timed out.

Dedicated Inference error codes (DDI-*)​

CodeMessage
DDI-AUTH-00001Authentication required. Please sign in and try again.
DDI-AUTH-00002You do not have permission to perform this action.
DDI-AUTH-00003Re-authentication is required. Please sign in again to continue.
DDI-AUTH-00004Internal authentication failed.
DDI-COMMON-00001Too many requests. Please try again in {{retry_after}} seconds.
DDI-EXTERNAL-00001The service is temporarily unavailable. Please try again later.
DDI-RESOURCE-00001The requested resource was not found.
DDI-RESOURCE-00002A conflict occurred with the current state of the resource. Please refresh and try again.
DDI-RESOURCE-00003No access credential found for this endpoint. Please redeploy the endpoint.
DDI-RESOURCE-00004The endpoint control token is outdated. Please redeploy the endpoint to re-sync.
DDI-RESOURCE-00005The endpoint is not ready yet. Please wait a moment and try again.
DDI-SYSTEM-00001The GPU Container service is not configured. Please contact support.
DDI-SYSTEM-00002An unexpected error occurred. Please try again later.
DDI-VALIDATION-00001The request is invalid. Please check your input and try again.
note

DDI endpoints run on GPU Container and may also return GPU Container error codes.