アカウントタスク一覧の取得
システムアクセストークンで自身のアカウントデータを取得
中国本土のユーザー向け: 中国本土のユーザーは https://toapis.cn を API エンドポイント (Base URL)としてご利用ください. 本ドキュメント内の例では https://toapis.com を https://toapis.cn に置き換えてください.
認証, ページ分割, エラーは利用ガイドを参照してください.
動作
既定は直近 24 時間, 最大 31 日, 内部 ID 降順です. ids 一括モードにページ分割と meta.from/to はありません. 保存済みメタデータのみ返し, 結果 URL やプロンプトは返しません. GET は上流ポーリング, 精算, 返金, Webhook 送信を行いません. 動画保存や精算が未完了なら processing, finished_at=null です. ゲート状態が確認できなければ 503. 課金不明は billing=null. pending は金額を省略し, 確認後は settled または refunded です.
認証
Authorizationstringヘッダー必須Bearer YOUR_SYSTEM_ACCESS_TOKEN を使用します. モデル API キーは使用できません. X-User-Id は不要です.
パラメータ
fromstringクエリタイムゾーン付き RFC 3339 の開始時刻. この時刻を含みます. to と一緒に指定します.
制約: date-time.
tostringクエリタイムゾーン付き RFC 3339 の終了時刻. この時刻を含まず, from より後である必要があります.
制約: date-time.
modelstringクエリモデル ID の完全一致. 使用量では空文字列は空のモデル名に一致します.
制約: maxLength=191.
cursorstringクエリ前の next_cursor を変更せずに渡します. フィルターを維持し, 変更時は最初から取得します.
制約: maxLength=2048.
limitintegerクエリデフォルト: 201 ページの最大件数.
制約: minimum=1; maximum=50; 既定値: 20.
typestringクエリタスク種別. status クエリはサポートしません.
制約: image, video, music, other.
client_business_idstringクエリ業務 ID の完全一致. 前後の空白と制御文字は使用できません.
制約: minLength=1; maxLength=191.
idsstringクエリプラットフォームタスク ID のカンマ区切り. 重複を含め最大 20 件で, 他のすべてのクエリと併用できません. 重複を除き初出順に返し, 存在しないタスクや他人のタスクは省略します.
リクエスト例
curl --request GET \
--url 'https://toapis.com/api/v1/account/tasks?from=2026-11-01T00:00:00Z&to=2026-11-02T00:00:00Z&type=video&limit=20' \
--header 'Authorization: Bearer YOUR_SYSTEM_ACCESS_TOKEN'import requests
response = requests.get(
"https://toapis.com/api/v1/account/tasks",
headers={"Authorization": "Bearer YOUR_SYSTEM_ACCESS_TOKEN"},
params={
"from": "2026-11-01T00:00:00Z",
"to": "2026-11-02T00:00:00Z",
"type": "video",
"limit": "20"
},
timeout=30,
)
response.raise_for_status()
print(response.json())const url = new URL("https://toapis.com/api/v1/account/tasks");
url.search = new URLSearchParams({
"from": "2026-11-01T00:00:00Z",
"to": "2026-11-02T00:00:00Z",
"type": "video",
"limit": "20"
}).toString();
const response = await fetch(url, {
headers: { Authorization: "Bearer YOUR_SYSTEM_ACCESS_TOKEN" },
signal: AbortSignal.timeout(30_000),
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}
console.log(await response.json());レスポンスフィールド
例は架空のデータで, credits_per_usd="100" を仮定しています. 実際の換算にはレスポンスの値を使用してください.
結果は data.items にあります. has_more と next_cursor で次のページを取得します. 最終カーソルは null です. 総件数は返しません.
codeinteger結果コード. 0 は成功です.
messagestring成功時は空文字列です. エラーメッセージは翻訳されます.
dataobject今回の照会結果オブジェクトです.
data.itemsobject[]現在のページのレコード一覧. 空の場合は [] です.
data.items[].idstringタスク詳細の取得に使うプラットフォーム ID. 業務 ID とは異なります.
data.items[].client_business_idstring | nullタスク作成時の業務 ID. プラットフォームタスク ID とは異なります. 不明または対象外の場合は null です.
data.items[].api_key_idstring | null関連するモデル API キーの ID. 関連なしは null です.
data.items[].typestringタスク種別です. 値: image, video, music, other.
data.items[].modelstringモデル識別子です.
data.items[].statusstring公開タスク状態. 動画保存や精算が未完了なら processing のままです. 値: pending, processing, completed, failed.
data.items[].progressintegerタスク進捗率で, 0-100 の値です.
data.items[].created_atstring | null作成時刻です. タイムゾーン付き RFC 3339 形式です. 不明または対象外の場合は null です.
data.items[].finished_atstring | null確認済みのタスク終了時刻. 処理中や未確認なら null です. タイムゾーン付き RFC 3339 形式です.
data.items[].billingobject | null確認可能なタスク課金情報. 確認できない場合は null です.
data.items[].billing.statusstring課金状態. pending は金額を省略し, 確認後は settled または refunded です. 値: pending, settled, refunded.
data.items[].billing.creditsstring確認済みの課金 credits. pending では省略します. 精度を保持するため 10 進文字列で返します.
data.items[].billing.cost_usdstring確認済みの課金 USD 額. pending では省略します. 精度を保持するため 10 進文字列で返します.
data.has_moreboolean次のページがあるかを示します.
data.next_cursorstring | null同じ条件で cursor にそのまま渡します. 最終ページは null です.
data.metaobjectデータソース, 照会範囲, 集計基準などのメタデータです.
data.meta.scopestring照会対象の所有範囲で, 認証された自身のアカウントです.
data.meta.sourcestringデータソースです. ローカル設定や台帳の値は Stripe のリアルタイム状態を意味しません.
data.meta.consistencystringeventual は結果整合性で, レコードは後で更新される場合があります.
data.meta.fromstring照会時間範囲の開始時刻を含みます.
data.meta.tostring照会時間範囲の終了時刻は含みません.
レスポンス例
{
"code": 0,
"message": "",
"data": {
"items": [
{
"id": "task_example_01",
"client_business_id": "order_example_01",
"api_key_id": "42",
"type": "video",
"model": "example-video-model",
"status": "completed",
"progress": 100,
"created_at": "2026-11-01T08:00:00Z",
"finished_at": "2026-11-01T08:01:00Z",
"billing": {
"status": "settled",
"credits": "2",
"cost_usd": "0.02"
}
}
],
"has_more": false,
"next_cursor": null,
"meta": {
"scope": "self",
"source": "persisted_tasks",
"consistency": "eventual",
"from": "2026-11-01T00:00:00Z",
"to": "2026-11-02T00:00:00Z"
}
}
}