Skip to main content
POST
バッチを作成
ワークスペースのプレビュー機能へのアクセスが必要です。設定、Webhook、結果の処理については、動画とバッチのジョブを参照してください。

承認

Authorization
string
header
必須

Bearer トークンによる認証

ボディ

application/json
provider_options
object

正規プロバイダーIDごとの拡張。OpenAIはoutput_expires_after、Mistralはmetadataを受け付けます。選択したプロバイダーのオプションのみ適用されます。最上位で同じオプションを重複指定しないでください。オプションで価格計算済みの行、モデル、ファイルを上書きすることはできません。

model
string

上流バッチプロバイダーを推定するモデルID。リクエスト行にもbody.modelを指定できますが、最上位のモデルが優先されます。

prompts
string[]

単純なプロンプトの省略形式。Phaseoは各プロンプトを選択モデル用のプロバイダー固有バッチ行に変換します。

items
object[]

構造化プロンプトの省略形式。項目にid、custom_id、prompt、messages、input、system、max_tokens、temperature、または高度なbodyを含められます。

system
string

プロンプト省略形式の行に適用する任意のシステム指示。

max_tokens
integer

プロンプト省略形式の行に適用する任意の最大トークン数。

temperature
number

プロンプト省略形式の行に適用する任意のサンプリング温度。

input_file_id
string

ファイルアップロードによるバッチ作成に使用する既存のプロバイダーファイルID。

requests
object[]

高度なバッチリクエスト行。prompts、items、requests、input_file_idのいずれか1つだけを指定してください。

endpoint
enum<string>

呼び出し元向けのリクエスト形式。バッチ内の全リクエストはこのエンドポイントを使用します。省略時はPhaseoがモデルからプロバイダー固有の既定値を選択します。

利用可能なオプション:
/v1/chat/completions,
/v1/responses,
/v1/messages,
/v1/embeddings,
/v1/generateContent
completion_window
string
metadata
object
session_id
string

関連するリクエスト(会話やエージェントのワークフローなど)を可観測性のためにまとめる一意の識別子です。

Maximum string length: 256
webhook
object
webhook_endpoint_id
string

webhook.endpoint_idの便利なエイリアス。

debug
object

ゲートウェイのデバッグ設定です。これらのフラグがプロバイダーに転送されることはありません。

provider
object

高度なルーティング制約。ほとんどのリクエストではモデルに基づくプロバイダー推定を使用してください。

レスポンス

バッチ状態のレスポンス

id
string
native_batch_id
string | null

ゲートウェイが所有するIDと異なる場合の、プロバイダー固有のバッチID。

object
string
endpoint
string
errors
object
input_file_id
string
completion_window
string
status
string
lifecycle_status
enum<string>

ポーリング、WebSocket、Webhookの利用側向けに正規化された非同期ライフサイクル状態。

利用可能なオプション:
pending,
running,
completed,
failed,
cancelled,
expired
progress
integer

プロバイダーのリクエスト数から算出するバッチのおおよその完了率(取得できる場合)。完了したバッチは100を報告します。

必須範囲: 0 <= x <= 100
polling_url
string<uri>
websocket_url
string<uri>

非同期ジョブの正規化されたライフサイクル更新を購読するWebSocket URL。

cancel_url
string<uri> | null

互換性のために予約されています。現在は常にnullです。

results_url
string<uri> | null

対応する終端状態バッチ用の認証付きPhaseo JSONLダウンロードURL。処理中はnullです。終端状態のバッチに出力がない場合もあります。所有ワークスペースのAPIキーを使用してください。プロバイダーの保持期限が適用されます。

output_file_id
string
error_file_id
string
created_at
integer
in_progress_at
integer
expires_at
integer
finalizing_at
integer
completed_at
integer
failed_at
integer
expired_at
integer
cancelling_at
integer
cancelled_at
integer
request_counts
object
metadata
object
request_id
string
provider
string
session_id
string
webhook
object

機密情報を除去した非同期Webhook設定と配信状態。シークレットは返されません。has_secretは署名付き配信が有効かを示します。署名付き配信にはx-phaseo-signature、x-phaseo-timestamp、x-phaseo-event-id、x-phaseo-event-type、x-phaseo-delivery-key、x-phaseo-attempt、x-phaseo-max-attemptsヘッダーが含まれます。

next_webhook_retry_at
string | null
last_webhook_progress
number | null
last_webhook_progress_at
string | null
last_webhook_dispatched_at
string | null
finalized_at
string | null
pricing_lines
object[]
usage
object

確定後の正規化された集計使用量とコスト。

billing
object
最終更新日 2026年10月2日