メインコンテンツまでスキップ

GPU Container

共通規約​

  • Base URL: https://api-neo.fpt.ai/
  • Path: api/bff/v1/gpucontainer/{orgIdentifier}/workspaces/{workspaceIdentifier}/{action}
  • Method: すべてPOST。
  • サービス固有ヘッダー: X-ENV: <APP_ENV>、X-Region: <region>
  • 共通ヘッダー (apiClient): X-Org-Id、X-Workspace-Id、X-User-Id
  • レスポンス: { "data": {...}, "errors": [] }

トークンとヘッダーの取得方法​

  1. Portalにログインし、GPU Containerページを開く。
  2. ブラウザのDevToolsでNetworkタブを開き、container.list リクエストを選択してAPIパス形式(orgIdentifier と workspaceIdentifier を含む)を確認する。
  3. 以下のリクエストヘッダーをコピーする: cookie、x-env、x-org-id、x-region、x-user-id、x-workspace-id。

エンドポイント一覧​

#ActionクエリパラメータBody用途
1container.listname(検索、任意){}コンテナ一覧
2container.getcontainer_id{}コンテナ詳細
3container.stat—{}ステータス別統計
4container.create—下記参照コンテナ作成
5container.startcontainer_id{ "action": "START" }起動
6container.stopcontainer_id{ "action": "STOP" }停止
7container.restartcontainer_id{ "action": "RESTART" }再起動
8container.deletecontainer_id{}削除
9container.editcontainer_id下記参照設定の編集 / ホワイトリストの更新
10container.downloadlogcontainer_id{}ログのダウンロード(responseType: blob)
11container.template.list—{}テンプレート一覧
12container.template.configconfig_name{}テンプレート設定の詳細
13container.flavor.list—{}GPUフレーバー一覧
14cost-estimation—下記参照コスト見積もり

リクエストボディ​

4. container.create​

{
"name": "my-container",
"instance_type": "H100",
"container_group": "",
"purpose": "SERVICE",
"description": "",
"container_settings": [{
"enable_ssh": true,
"authorized_keys": [{ "name": "key1", "ssh_key": "ssh-ed25519 AAAA..." }],
"image_setting": { "image_url": "...", "image_tag": "latest", "image_user": "", "image_password": "", "fptcloud_official": false },
"volume_settings": [{ "volume_type": "TEMP_DISK | PERSISTENT_DISK", "mount_path": "/workspace", "mount_capacity": 100 }],
"advance_setting": {
"http_ports": [{ "container_port": 8888 }],
"tcp_ports": [{ "container_port": 22 }],
"container_envs": [{ "key": "K", "value": "V" }],
"startup_cmd": { "cmd": [], "args": [] },
"healthchecks": []
}
}],
"billing_plan": { "billing_type": "PAYG", "billing_level": "NORMAL", "cost_estimate": 0, "currency_code": "USD" }
}

レスポンス: { id, name, status }。

9. container.edit​

container.get で取得したコンテナオブジェクト全体を変更を加えて送り返す。

トップレベルフィールド: id、status、created_at、updated_at、tenant_id、name、container_group、purpose、instance_type、billing_plan、description、tags、domain、version、deleted。

container_settings[] フィールド: enable_ssh、authorized_keys、ssh_connect、image_setting、volume_settings[{volume_name?, volume_type, mount_path, mount_capacity}]、advance_setting{http_ports, tcp_ports, startup_cmd, container_envs, healthchecks, block_cidrs}。

ホワイトリストのみ更新する場合:

{ "block_cidrs": [{ "type": "TCP | HTTP", "ports": [8888], "sources": ["1.2.3.4/32"], "description": "" }] }

14. cost-estimation​

{
"instance_type": "H100",
"container_settings": [{ "volume_settings": [{ "volume_type": "PERSISTENT_DISK", "mount_path": "/data", "mount_capacity": 100 }] }]
}

レスポンス: { org_id, items: [{ sku, quantity, price }], currency_code, total }。

レスポンス​

Actionレスポンス
container.listdata: { items: ListItem[], total, page?, page_size?, total_pages? }; ListItem: id, name, status, region, org_id, ws_id, created_by, purpose, instance_type, container_group, tenant_id, container_settings[{image_setting, enable_ssh, authorized_keys, ssh_connect}], billing_plan, tags, created_at, updated_at
container.getListItemと同じだがcontainer_settings[]が完全: image_setting, enable_ssh, authorized_keys, ssh_connect, advance_setting, volume_settings, container_resource, observability.container_monitor{container_metric_url, container_log_url}
container.statdata: { stats: [{ status, count }] }
container.template.listdata: { items: [{ name, url, icon?, priority?, fptcloud_official? }], total, page?, size? }
container.template.config{ name, priority, fptcloud_official, purpose, flavor_name, description, instance_type, container_settings[{ image_settings, volume_settings, advanced_setting }] }
container.flavor.listdata: { items: [{ flavor, price_info{currency, value, unit?}, resource{cpu, ram, gpu, vram, temp_disk}, available, region }], total }

列挙型 (Enum)​

  • status: CREATING、RUNNING、STOPPED、PROCESSING、FAILED、DELETING、DELETED
  • billing_type: PAYG、SAVING_PLAN_1_WEEK、SAVING_PLAN_1_MONTH、SAVING_PLAN_3_MONTH、SAVING_PLAN_1_YEAR
  • billing_level: NORMAL、WARNING、STOPPED、AT_RISK
  • volume_type: TEMP_DISK、PERSISTENT_DISK

エラーコード​

エラー形式​

エラー時、HTTPステータス ≠ 2xx でbodyは以下の形式:

{ "code": "DDI-SYSTEM-00001", "message": "...", "params": {}, "role_based": false }
  • role_based: true — 呼び出し元のロール(MANAGEMENT / WS_ADMIN / MEMBER)によってメッセージが異なる。
  • HTTP 401 — クライアントはログアウトしてログインページにリダイレクトする。

共通エラーコード (gateway / BFF / billing)​

Code意味
INSUFFICIENT_BALANCEクレジット不足。MANAGEMENT ロールは自動でトップアップモーダルを開く。それ以外のロールはオーナーへの連絡を促される。
INSUFFICIENT_PERMISSIONSこの操作を実行する権限がない。
EQ-RESOURCE-SYSTEM-LIMITリソースのクォータに達した(params.name)。
BFF-CREATING-CONCURRENCYこのワークスペース/サービスで別のリソースが作成中。完了後に再試行する。
route_not_foundエンドポイントが存在しない。
method_not_allowedメソッドが間違っている。POSTのみ使用可能。
request_too_largeボディが64 KBを超えている。
invalid_tokenトークンが無効または期限切れ。
gateway_internal_errorゲートウェイ内部エラー。
upstream_unavailableバックエンドサービスが一時的に利用不可。
gateway_timeoutバックエンドサービスがタイムアウト。

GPU Container 固有エラーコード​

Codeメッセージ
DDI-SYSTEM-00001GPU ContainerサービスはこのテナントにはまだConfigされていません。Supportへお問い合わせください。
DDI-SYSTEM-00002不明なエラーが発生しました。しばらくしてから再試行してください。