このインターフェースはテキストタイプの出力のみを返します。コマンドがファイル生成などの操作を含む場合、「ファイル表示」インターフェースを使用してファイル情報を確認し、「ファイルダウンロード」インターフェースを使用して302ファイルシステムにファイルをエクスポートしてください。価格:サンドボックスの実行時間(秒) * 0.001 PTC
Request
Example:Bearer {{YOUR_API_KEY}}
Body Params application/json
{
"cmd": "string",
"envs": {},
"timeout": 5,
"sandbox_id": "string"
}
Request samples
curl --location --request POST 'https://api.302.ai/302/sandbox/command' \
--header 'Authorization: Bearer sk-mfYQzy0XTFfz4P16vRE4gFrKK1Nly4TozsMqbbb9PSiJUvFO' \
--header 'Content-Type: application/json' \
--data-raw '{
"cmd": "string",
"envs": {},
"timeout": 5,
"sandbox_id": "string"
}'
Responses
application/json {"result":{"stderr":"","stdout":"482504fd08f1\n","exit_code":0,"error":"","cost_time":9}}
Modified at 2025-03-27 02:58:32