/api/orgs/{org_id}/provider-connections/{provider}/plans/importプランのログインをインポート
すでに保有しているログインを保存します。ChatGPTの場合は~/.codex/auth.json、Claudeの場合はClaude Codeの~/.claude/.credentials.jsonの内容です(Claudeはデプロイが共有クライアントモードで動作している場合のみで、それ以外は404)。リフレッシュトークンは一度しか使えないため、インポートでログインが引き渡され、ローカルのクライアントは再度ログインする必要があります。Proの要件はログインと同じです。
認証: AuthorizationヘッダーにBearer形式のAPIキー
パスパラメーター
org_idstring必須お客様の組織ID(uuid)。
GET /api/whoamiで取得できます。providerenum必須ChatGPTプランは
openai、Claudeプランはanthropic。その他のプロバイダーは404です。
リクエストボディ
auth_jsonstring必須~/.codex/auth.json(ChatGPT)または~/.claude/.credentials.json(Claude)のファイル内容。setup_aliasstring必須scopeenum
レスポンス
200保存されたプランアカウント。
レスポンス
setup_aliasstring必須planobject必須プランアカウントがキーの代わりに保持するもの。
plan
labelstring必須plan_typestring | null必須例:plus、pro、team、max。
primaryobject | null必須いずれか
object
used_percentinteger必須reset_atstring | null必須window_minutesinteger | null必須
secondaryobject | null必須いずれか
object
used_percentinteger必須reset_atstring | null必須window_minutesinteger | null必須
derivedobject | nullいずれか
object
five_hourobject | null必須いずれか
object
requestsinteger必須input_tokensinteger必須cached_input_tokensinteger必須output_tokensinteger必須first_activitystring | null必須last_activitystring | null必須
seven_dayobject | null必須いずれか
object
requestsinteger必須input_tokensinteger必須cached_input_tokensinteger必須output_tokensinteger必須first_activitystring | null必須last_activitystring | null必須
checked_atstring | null必須scopeenumorg:共有プール。account:owner_user_idが作成したAPIキーのみ。owner_user_idstring | nullrotation_pausedboolean一時停止中のプランはリクエストを処理しません。
refreshes_atstring | null使い切ったウィンドウにより一時停止したプランが更新される時刻。
statusenum必須プロバイダーが確認したキーの状態で、接続チェックと実際のトラフィックによって書き込まれます。
provider_errorはチェック時にプロバイダーに到達できなかったことを示し、キーが不正であることを意味しません。scopeenum必須owner_user_idstring | null必須rotation_pausedboolean必須
401APIキーがない、不明、または失効しています。
レスポンス
errorstring必須人が読めるメッセージ。
codestringエンドポイントが定義している場合の、安定した機械可読の理由(例:
pro_required)。actionstringエンドポイントが定義している場合の、安定した対処アクション。
detailsobject呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。
402プランアカウントの追加にはProが必要です。
レスポンス
errorstring必須人が読めるメッセージ。
codestringエンドポイントが定義している場合の、安定した機械可読の理由(例:
pro_required)。actionstringエンドポイントが定義している場合の、安定した対処アクション。
detailsobject呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。
403キーは有効ですが、この操作は許可されていません(例:プロビジョニングキー用エンドポイントでの推論キー、プラン対象外の機能)。
レスポンス
errorstring必須人が読めるメッセージ。
codestringエンドポイントが定義している場合の、安定した機械可読の理由(例:
pro_required)。actionstringエンドポイントが定義している場合の、安定した対処アクション。
detailsobject呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。
404リソースが存在しないか、他の組織に属しています。
レスポンス
errorstring必須人が読めるメッセージ。
codestringエンドポイントが定義している場合の、安定した機械可読の理由(例:
pro_required)。actionstringエンドポイントが定義している場合の、安定した対処アクション。
detailsobject呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。
409このハンドルは別のスコープのプランで既に使用されています。
レスポンス
errorstring必須人が読めるメッセージ。
codestringエンドポイントが定義している場合の、安定した機械可読の理由(例:
pro_required)。actionstringエンドポイントが定義している場合の、安定した対処アクション。
detailsobject呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。
422ハンドルがない、またはプロバイダー名のみのハンドル、あるいはAPIキーからの
scope: account(account_scope_needs_member)。レスポンス
errorstring必須人が読めるメッセージ。
codestringエンドポイントが定義している場合の、安定した機械可読の理由(例:
pro_required)。actionstringエンドポイントが定義している場合の、安定した対処アクション。
detailsobject呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。
リクエスト
curl -X POST 'https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/provider-connections/openai/plans/import' \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"setup_alias": "chatgpt-team",
"scope": "org",
"auth_json": "{\"tokens\":{\"id_token\":\"eyJ...\",\"access_token\":\"eyJ...\",\"refresh_token\":\"rt_EXAMPLE\",\"account_id\":\"acct_EXAMPLE\"}}"
}'レスポンス
{
"setup_alias": "chatgpt-team",
"plan": {
"label": "dev@acme.example",
"plan_type": "team",
"primary": {
"used_percent": 12,
"reset_at": "2026-11-19T18:40:00Z",
"window_minutes": 300
},
"secondary": {
"used_percent": 41,
"reset_at": "2026-11-23T09:00:00Z",
"window_minutes": 10080
},
"derived": null,
"checked_at": "2026-11-19T14:21:07.330Z",
"scope": "org",
"owner_user_id": null,
"rotation_paused": false,
"refreshes_at": null
},
"status": "valid",
"scope": "org",
"owner_user_id": null,
"rotation_paused": false
}https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/provider-connections/openai/plans/import