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

Serverless Inference

共通規約​

  • Base URL: BASE_API_URL
  • Path: /bff/v1/serverless-inference/{orgIdentifier}/workspaces/{workspaceIdentifier}/{action}
  • Method: すべてPOST。
  • サービス固有ヘッダー: X-Region: hanoi-vn (固定)、X-Portal-Roles: <ワークスペース内のユーザーロール>
  • 共通ヘッダー (apiClient): X-Org-Id、X-Workspace-Id、X-User-Id
  • 2種類の呼び出し方式(どちらもPOST):
    • Query action (list/get/view): bodyは空、パラメータはクエリ文字列で渡す。
    • Body action (create/edit/...): パラメータはJSON bodyで渡す。
  • Response: { "data": <payload> }。ページネーションリスト: { items, page, page_size, total, total_pages }。
  • si.playground.chat(ストリーム)、si.tts.generate / si.playground.tts(バイナリ)は「注意事項」参照。

エンドポイント一覧​

モデル​

#Actionタイプパラメータ用途
1si.model.listquerypage, page_size, keyword, categories[], providers[], tags[], model_types[], model_region[], host, status, public, select, access_levelモデル一覧
2si.model.getquerycodeモデル詳細
3si.model.listoptionquerypage, page_sizeフィルターオプション(category、provider、type、host、data residency)
4si.model.codesamplebody{ code, sdk? }モデル別コードサンプル
5si.model.reqdedicatedbody{ name, model_name, email, phone_number, use_case, created_at }専用モデルのリクエスト送信

APIキー​

#Actionタイプパラメータ用途
6si.apikey.listquerypage, page_sizeAPIキー一覧
7si.apikey.createbody{ name, model_ids[], expires_at?, rate_limit_per_hour? }APIキー作成
8si.apikey.editbody{ id, name?, model_ids?, rate_limit_per_hour?, status? }APIキー編集
9si.apikey.revokebody{ id, status? }APIキーの失効

使用状況 (Usage)​

#Actionタイプパラメータ用途
10si.usage.viewqueryfrom_date, to_date, model, filter_email, key_name使用状況の概要
11si.usage.modelquery上記 + page, page_sizeモデル別使用状況
12si.usage.apikeyquery上記 + page, page_sizeAPIキー別使用状況
13si.usage.optionsquery—フィルターオプション(api_keys、models)

プレイグラウンド​

#Actionタイプパラメータ用途
14si.playground.optionsquery—プレイグラウンド用モデル一覧
15si.playground.chatbodyISiInferencePayloadチャット補完(stream true/false)
16si.playground.embeddingbody{ model, input[], dimensions, encoding_format, input_text_truncate, input_type }エンベディング
17si.playground.ttsbody{ model, input, voice, speed, response_format }テキスト読み上げ(バイナリ)

ボイススタジオ​

#Actionタイプパラメータ用途
18si.tts.generatebody{ model, input, voice, speed, response_format }音声生成(バイナリ)
19si.voice.history.listquerypage, page_size, model_code, search音声履歴
20si.voice.history.deletebody{ id }履歴1件削除
21si.voice.history.deleteallbody—全履歴削除
22si.voice.history.audiourlbody{ id }音声URL取得(presigned)
23si.voice.activebody{ status: boolean }音声の有効/無効切替

クォータ(異なるBFFパス)​

#MethodPathパラメータ用途
24GET/bff/v1/iam/{org}/workspaces/{ws}/quota-memberspage, limit, search, sortBy, order, serviceCode, metricKey(FEデフォルト: serviceCode=serverless-inference、metricKey=credit)メンバー一覧とクォータ
25GET/bff/v1/iam/{org}/workspaces/{ws}/quota-members/overview—ワークスペースのクォータ概要
26GET/bff/v1/iam/{org}/workspaces/{ws}/quota-members/usage—自分の使用量/クォータ
27POST/bff/v1/eq/{org}/workspaces/{ws}/quotasISiSetQuotaCapPayloadの配列クォータキャップの設定
28PUT/bff/v1/eq/{org}/workspaces/{ws}/quotasISiUpdateQuotaCapPayloadの配列クォータキャップの更新
29POST/bff/v1/eq/{org}/quotas:checkUpsertISiCheckUpsertQuotaPayloadの配列クォータ設定前の検証

リクエストボディ​

15. si.playground.chat​

{
"model": "model-code",
"messages": [{ "role": "user", "content": "Hello", "reasoning_content": null, "name": "", "tool_call_id": "", "tool_calls": [] }],
"stream": true,
"stream_options": { "include_usage": true },
"temperature": 0.7, "top_p": 1, "max_tokens": 1024, "max_completion_tokens": 1024,
"frequency_penalty": 0, "presence_penalty": 0, "n": 1, "seed": 0, "stop": [],
"logit_bias": {}, "logprobs": false, "top_logprobs": 0,
"response_format": { "type": "text" },
"tools": [{ "type": "function", "function": { "name": "", "description": "", "parameters": {} } }],
"tool_choice": null, "metadata": {}, "user": ""
}

contentは文字列またはオブジェクトの配列(マルチモーダル、例:画像)。modelとmessagesのみ必須。

27 / 28 / 29. クォータ​

// 27 setQuotaCap
[{ "metric_key": "credit", "dimensions": { "service_code": "serverless-inference", "user_id": "..." }, "limit_value": 100, "period": "MONTH" }]

// 28 updateQuotaCap (limit_value null = キャップ解除)
[{ "metric_key": "credit", "dimensions": { "service_code": "...", "user_id": "..." }, "limit_value": 200, "workspace_id": "..." }]

// 29 checkUpsert
[{ "metric_key": "credit", "dimensions": { "service_code": "...", "user_id": "..." }, "limit_value": 200, "workspace_id": "..." }]

レスポンス​

ActionResponse (data)
si.model.list{ items: Model[], page, page_size, total, total_pages }; Model: id, code, name, version, model_type, status, access_level, host{id, code, name, host_type(resell|self_hosted), region_name, region_code}, tags[], introduction{short, long, usecase}, capabilities{context_length, max_output_tokens, supports_stream, supports_function_call, supports_vision, supports_json_schema}, docs{overview_md, details_md, benchmarks_md, usage_notes_md, image_url}, pricing{currency, input_price_per_1m, output_price_per_1m, cached_price_per_1m, billing_unit}, max_requests_per_minute, max_requests_per_minute_per_api_key, max_tokens_per_minute, max_tokens_per_minute_per_api_key, has_access_to_non_public_model, category, provider, parameters, performance, created_at, updated_at
si.model.getModel(上記と同じ)
si.model.listoption{ categories[], providers[], model_types[{id, name, code}], hosts[{id, name, count}], data_residency[{id, name}] }
si.model.codesample[{ id, model_type, type, sdk, title, description, code_block, response_block, sort_order }]
si.apikey.list{ items: ApiKey[], page, page_size, total, total_pages }; ApiKey: id, name, masked_key, status, organization_id, user_id, models[{id, name, version, model_type, status}], rate_limit_per_hour, expires_at, last_used_at, created_at, updated_at
si.apikey.create{ api_key, key_info: ApiKey } (api_keyはシークレット、一度だけ表示)
si.apikey.edit / revokeApiKey
si.usage.view{ currency, estimated_cost, estimated_cost_change_pct, tokens_in, tokens_in_change_pct, tokens_out, tokens_out_change_pct, total_requests, total_requests_change_pct }
si.usage.model{ items: [{ model_code, model_name, provider_name, requests, tokens_in, tokens_out, cached_read_tokens, cost, currency }], page, page_size, total, total_pages }
si.usage.apikey{ items: [{ api_key_name, masked_key, scope, status, user_email, requests, tokens_in, tokens_out, cached_read_tokens, cost, currency }], ... }
si.usage.options{ api_keys: [{ id, masked_key, name, status, user_email }], models: [{ id, code, name }] }
si.playground.options{ models: [{ id, code, name, category, voices[], response_format[], price }] }
si.playground.chat(非ストリーミング){ id, object, created, model, provider, system_fingerprint, choices[{ index, finish_reason, logprobs, message }], usage{prompt_tokens, completion_tokens, total_tokens} }
si.playground.embedding[{ object, index, embedding: number[] | base64 string }]
si.voice.history.list{ items: [{ id, model_id, voice, input_text, speed, audio_format, audio_size_bytes, duration_seconds, status, has_audio, audio_url, audio_url_expires_at, expired_at, created_at }], total, page, page_size, total_pages }
si.voice.history.audiourl{ audio_url, expires_at, ttl_seconds }
quota-members[{ id, username, email, firstName, lastName, role, joinedAt, isActive, lastLogin, totalWorkspaces, status, canRemove, monthlyCap, hasCap, mtdUsage, percentageUsed, nearLimit }]
quota-members/overview{ workspaceQuota{ quotaId, limitValue, period, region, metricKey } | null, summary{ totalMembers, withCap, noCap, nearLimit } }
quota-members/usage{ monthlyCap, hasOwnCap, mtdUsage, percentageUsed, nearLimit }

列挙型 (Enum)​

  • APIキー status: active、suspended、revoked、blocked、expired
  • host_type: resell、self_hosted
  • response_format(音声): mp3、wav、opus、flac、caf
  • encoding_format(埋め込み): float、base64;input_text_truncate: none、start、end;input_type: passage、query
  • プレイグラウンドカテゴリ: large_language_model、vision_language_model、embedding_model、speech_to_text、text_to_speech、rerank、vision_language_action

注意事項​

  • ストリームチャット: si.playground.chatでstream: trueを指定するとAccept: text/event-streamを送信し、SSEを返す(チャンクchat.completion.chunk: choices[].delta{role, content, reasoning_content};最終チャンクにusageが含まれる場合あり)。ストリーム中のエラーはJSON body { code, message }を返す。
  • バイナリ: si.tts.generate、si.playground.ttsは音声ファイルを返す;音声URLがある場合はレスポンスヘッダーx-audio-urlに含まれる。
  • Voice Studioの最大入力文字数は5000文字(FE)。
  • Dedicated InferenceのAPIドキュメント: docs/dedicated-inference/api-endpoints.md。

エラーコード​

エラー形式​

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

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

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

Code意味
INSUFFICIENT_BALANCEクレジット不足(role-based)。MANAGEMENTロールは自動でトップアップモーダルを開く。
INSUFFICIENT_PERMISSIONSこの操作を実行する権限がない。
EQ-RESOURCE-00001クォータに達した(role-based、params.quotaLevelによる: Organization / Workspace / Service)。
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バックエンドサービスがタイムアウト。

Serverless Inference 固有エラーコード(SI-*)​

Codeメッセージ
SI-AUTH-00001Authorization is required.
SI-AUTH-00002The access token is invalid or has expired.
SI-AUTH-00003User not authenticated.
SI-AUTH-00004Cannot access other user's data.
SI-AUTH-00005Organization scope missing from access token.
SI-AUTH-00006Authentication is temporarily unavailable.
SI-AUTH-00007Invalid or expired token.
SI-AUTH-00008Unauthorized - User not authenticated.
SI-KEYS-00001You are not a member of this organization.
SI-KEYS-00002One or more model IDs not found.
SI-KEYS-00003Cannot create API key: organization balance is insufficient. Please top up and try again.
SI-KEYS-00004An API key with this name already exists in this workspace.
SI-KEYS-00005Failed to create API key.
SI-KEYS-00006Failed to list API keys.
SI-KEYS-00007API key not found.
SI-KEYS-00008You are not authorized to access this API key.
SI-KEYS-00009API key has been revoked.
SI-KEYS-00010API key is inactive.
SI-KEYS-00011Failed to get API key.
SI-KEYS-00012You are not authorized to update this API key.
SI-KEYS-00014Invalid status transition. Revoked and blocked keys cannot be reactivated.
SI-KEYS-00016Failed to update API key.
SI-KEYS-00017You are not authorized to delete this API key.
SI-KEYS-00018Failed to delete API key.
SI-KEYS-00019You are not authorized to revoke this API key.
SI-KEYS-00020Failed to revoke API key.
SI-LEADS-00001A request for this model was already submitted with this email recently.
SI-LEADS-00002Validation failed.
SI-LEADS-00003Failed to submit contact-us lead.
SI-MODEL_HOST-00001Failed to create model host.
SI-MODEL_HOST-00002Failed to get model host.
SI-MODEL_HOST-00003Failed to list model hosts.
SI-MODEL_HOST-00004Failed to update model host.
SI-MODEL_HOST-00005Failed to delete model host.
SI-MODEL_HOST-00006Model host cannot be deleted while models still reference it.
SI-MODEL_SAMPLES-00001Failed to list samples.
SI-MODEL_SAMPLES-00002Failed to get sample.
SI-PERMISSION-00001Forbidden - Insufficient permissions.
SI-PLAYGROUND-00001Failed to list playground model options.
SI-PORTAL-MODELS-00001Failed to create model.
SI-PORTAL-MODELS-00002Failed to get model.
SI-PORTAL-MODELS-00003Failed to list models.
SI-PORTAL-MODELS-00006Failed to get related models.
SI-PORTAL-MODELS-00007Failed to update model.
SI-PORTAL-MODELS-00008Failed to delete model.
SI-PORTAL-MODELS-00009Failed to get capabilities.
SI-PORTAL-MODELS-00010Failed to update capabilities.
SI-PORTAL-MODELS-00011Failed to get pricing.
SI-PORTAL-MODELS-00012Failed to update pricing.
SI-PORTAL-MODELS-00013Failed to get limits.
SI-PORTAL-MODELS-00014Failed to update limits.
SI-PORTAL-MODELS-00015Failed to get rate limits.
SI-PORTAL-MODELS-00016Failed to update rate limits.
SI-PORTAL-MODELS-00017Failed to get docs.
SI-PORTAL-MODELS-00018Failed to update docs.
SI-PORTAL-MODELS-00019Failed to list benchmarks.
SI-PORTAL-MODELS-00020Failed to create benchmark.
SI-PORTAL-MODELS-00021Failed to delete benchmark.
SI-PORTAL-MODELS-00022Failed to list reviews.
SI-PORTAL-MODELS-00023Failed to get average rating.
SI-PORTAL-MODELS-00024Failed to create review.
SI-PORTAL-MODELS-00025Failed to delete review.
SI-PORTAL-MODELS-00026Failed to list active categories.
SI-PORTAL-MODELS-00027Failed to list active providers.
SI-PORTAL-MODELS-00028Failed to retrieve pricing information.
SI-PORTAL-MODELS-00030Failed to query Grafana.
SI-PORTAL-MODELS-00031Failed to list trending models.
SI-RESOURCE-00001{{resource}} not found.
SI-SYSTEM-00001Internal server error.
SI-USAGE-MODEL-00001Failed to retrieve model usage.
SI-USAGE-MODEL-00002Failed to retrieve usage statistics.
SI-USAGE-MODEL-00003Failed to retrieve usage options.
SI-USAGE-MODEL-00004Failed to retrieve API key usage.
SI-USER-00001User not found.
SI-VALIDATION-00001{{field}} should not exist.
SI-VALIDATION-00002{{field}} is required.
SI-VALIDATION-00003{{field}} must be an integer.
SI-VALIDATION-00004{{field}} must be a number.
SI-VALIDATION-00005{{field}} must be a boolean.
SI-VALIDATION-00006{{field}} must follow {{format}}.
SI-VALIDATION-00007{{field}} must be a valid email address containing an @ followed by a domain, for example name@example.com.
SI-VALIDATION-00008{{field}} must be a UUID.
SI-VALIDATION-00009{{field}} must be at least {{limit}}.
SI-VALIDATION-00010{{field}} must not exceed {{limit}}.
SI-VALIDATION-00011{{field}} must be one of: {{allowed_values}}.
SI-VALIDATION-00012{{field}} must be provided only once.
SI-VALIDATION-00013Request body must be valid JSON.
SI-VALIDATION-00014{{field}} is invalid.
SI-VALIDATION-00015{{field}} must be a string.
SI-VOICE-00001History is not found in caller scope.
SI-VOICE-00002History operation conflicts with current state.
SI-VOICE-00003History query/delete/persistence failure.
SI-VOICE-00004Object storage or presigning unavailable.