@@ -99,13 +99,13 @@ def with_streaming_response(self) -> SessionsResourceWithStreamingResponse:
9999 def create (
100100 self ,
101101 * ,
102+ api_timeout : int | Omit = omit ,
102103 browser_settings : session_create_params .BrowserSettings | Omit = omit ,
103104 extension_id : str | Omit = omit ,
104105 keep_alive : bool | Omit = omit ,
105106 project_id : str | Omit = omit ,
106107 proxies : Union [bool , Iterable [session_create_params .ProxiesUnionMember1 ]] | Omit = omit ,
107108 region : Literal ["us-west-2" , "us-east-1" , "eu-central-1" , "ap-southeast-1" ] | Omit = omit ,
108- api_timeout : int | Omit = omit ,
109109 user_metadata : Dict [str , object ] | Omit = omit ,
110110 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
111111 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -114,12 +114,14 @@ def create(
114114 extra_body : Body | None = None ,
115115 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
116116 ) -> SessionCreateResponse :
117- """Create a Session
117+ """
118+ Create a Session
118119
119120 Args:
120- extension_id: The uploaded Extension ID.
121+ api_timeout: Duration in seconds after which the session will automatically end. Defaults to
122+ the Project's `defaultTimeout`.
121123
122- See
124+ extension_id: The uploaded Extension ID. See
123125 [Upload Extension](/reference/api/upload-an-extension).
124126
125127 keep_alive: Set to true to keep the session alive even after disconnections. Available on
@@ -133,9 +135,6 @@ def create(
133135
134136 region: The region where the Session should run.
135137
136- api_timeout: Duration in seconds after which the session will automatically end. Defaults to
137- the Project's `defaultTimeout`.
138-
139138 user_metadata: Arbitrary user metadata to attach to the session. To learn more about user
140139 metadata, see [User Metadata](/features/sessions#user-metadata).
141140
@@ -151,13 +150,13 @@ def create(
151150 "/v1/sessions" ,
152151 body = maybe_transform (
153152 {
153+ "api_timeout" : api_timeout ,
154154 "browser_settings" : browser_settings ,
155155 "extension_id" : extension_id ,
156156 "keep_alive" : keep_alive ,
157157 "project_id" : project_id ,
158158 "proxies" : proxies ,
159159 "region" : region ,
160- "api_timeout" : api_timeout ,
161160 "user_metadata" : user_metadata ,
162161 },
163162 session_create_params .SessionCreateParams ,
@@ -369,13 +368,13 @@ def with_streaming_response(self) -> AsyncSessionsResourceWithStreamingResponse:
369368 async def create (
370369 self ,
371370 * ,
371+ api_timeout : int | Omit = omit ,
372372 browser_settings : session_create_params .BrowserSettings | Omit = omit ,
373373 extension_id : str | Omit = omit ,
374374 keep_alive : bool | Omit = omit ,
375375 project_id : str | Omit = omit ,
376376 proxies : Union [bool , Iterable [session_create_params .ProxiesUnionMember1 ]] | Omit = omit ,
377377 region : Literal ["us-west-2" , "us-east-1" , "eu-central-1" , "ap-southeast-1" ] | Omit = omit ,
378- api_timeout : int | Omit = omit ,
379378 user_metadata : Dict [str , object ] | Omit = omit ,
380379 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
381380 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -384,12 +383,14 @@ async def create(
384383 extra_body : Body | None = None ,
385384 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
386385 ) -> SessionCreateResponse :
387- """Create a Session
386+ """
387+ Create a Session
388388
389389 Args:
390- extension_id: The uploaded Extension ID.
390+ api_timeout: Duration in seconds after which the session will automatically end. Defaults to
391+ the Project's `defaultTimeout`.
391392
392- See
393+ extension_id: The uploaded Extension ID. See
393394 [Upload Extension](/reference/api/upload-an-extension).
394395
395396 keep_alive: Set to true to keep the session alive even after disconnections. Available on
@@ -403,9 +404,6 @@ async def create(
403404
404405 region: The region where the Session should run.
405406
406- api_timeout: Duration in seconds after which the session will automatically end. Defaults to
407- the Project's `defaultTimeout`.
408-
409407 user_metadata: Arbitrary user metadata to attach to the session. To learn more about user
410408 metadata, see [User Metadata](/features/sessions#user-metadata).
411409
@@ -421,13 +419,13 @@ async def create(
421419 "/v1/sessions" ,
422420 body = await async_maybe_transform (
423421 {
422+ "api_timeout" : api_timeout ,
424423 "browser_settings" : browser_settings ,
425424 "extension_id" : extension_id ,
426425 "keep_alive" : keep_alive ,
427426 "project_id" : project_id ,
428427 "proxies" : proxies ,
429428 "region" : region ,
430- "api_timeout" : api_timeout ,
431429 "user_metadata" : user_metadata ,
432430 },
433431 session_create_params .SessionCreateParams ,
0 commit comments