
    ei{                       S SK Jr  S SKJrJrJr  S SKJrJr  S SK	r	SSK
Jr  SSKJrJrJrJrJrJrJr  SSKJrJrJrJrJrJrJrJr  SS	KJrJrJ r J!r!  SS
K"J#r#  SSK$J%r%J&r&  SSK'J(r(J)r)J*r*J+r+J,r,J-r-  SSK.J/r/J0r0  SSK1J2r2  SSK3J4r4J5r5  SSK6J7r7  SSK8Jr  SSK9Jr  SSK:Jr  SSK;J<r<  SS/r= " S S\%5      r> " S S\&5      r? " S S5      r@ " S S5      rA " S S5      rB " S S 5      rCg)!    )annotations)TYPE_CHECKINGMappingcast)Literalassert_neverN   )_legacy_response)	VideoSize
VideoModelVideoSecondsvideo_list_paramsvideo_remix_paramsvideo_create_paramsvideo_download_content_params)BodyOmitQueryHeadersNotGiven	FileTypesomit	not_given)extract_filesmaybe_transformdeepcopy_minimalasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)StreamedBinaryAPIResponseAsyncStreamedBinaryAPIResponseto_streamed_response_wrapper"async_to_streamed_response_wrapper#to_custom_streamed_response_wrapper)async_to_custom_streamed_response_wrapper)SyncConversationCursorPageAsyncConversationCursorPage)Video)AsyncPaginatormake_request_options)is_given)r   )r   )r   )VideoDeleteResponseVideosAsyncVideosc            
         \ rS rSr\SS j5       r\SS j5       r\\\\SSS\S.                   SS jjr	\\\\\SSS\S.	                     SS jjr
\S	.     SS
 jjrSSS\S.           SS jjr\\\SSS\S.               SS jjrSSS\S.           SS jjr\SSS\S.             SS jjrSSS\S.             SS jjrSrg)r.   ,   c                    [        U 5      $ z
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
)VideosWithRawResponseselfs    e/var/www/html/BTCUSD/btcusdt_trading_app/venv/lib/python3.13/site-packages/openai/resources/videos.pywith_raw_responseVideos.with_raw_response-   s     %T**    c                    [        U 5      $ z
An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response
)VideosWithStreamingResponser5   s    r7   with_streaming_responseVideos.with_streaming_response7   s     +400r:   Ninput_referencemodelsecondssizeextra_headersextra_query
extra_bodytimeoutc       	           [        UUUUUS.5      n
[        [        [        [        [
        4   U
5      S//S9nU(       a  SS0U=(       d    0 EnU R                  S[        U
[        R                  5      U[        XgXS9[        S9$ )	Z  
Create a video

Args:
  prompt: Text prompt that describes the video to generate.

  input_reference: Optional image reference that guides generation.

  model: The video generation model to use. Defaults to `sora-2`.

  seconds: Clip duration in seconds. Defaults to 4 seconds.

  size: Output resolution formatted as width x height. Defaults to 720x1280.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds
promptrA   rB   rC   rD   rA   pathsContent-Typemultipart/form-data/videosrE   rF   rG   rH   bodyfilesoptionscast_to)r   r   r   r   strobject_postr   r   VideoCreateParamsr+   r)   r6   rL   rA   rB   rC   rD   rE   rF   rG   rH   rT   rU   s               r7   createVideos.create@   s    J   #2"
 d73;#7>HYGZF[\ ,-B\}GZXZ\Mzz ':'L'LM(+Q[   
 	
r:   	rA   rB   rC   rD   poll_interval_msrE   rF   rG   rH   c       
        d    U R                  UUUUUUUU	U
S9	nU R                  UR                  US9$ )/Create a video and wait for it to be processed.	rB   rL   rA   rC   rD   rE   rF   rG   rH   r`   r]   pollidr6   rL   rA   rB   rC   rD   r`   rE   rF   rG   rH   videos               r7   create_and_pollVideos.create_and_poll~   sT    " +'#!  

 yyHH-  
 	
r:   rd   c                  SS0n[        U5      (       a  [        U5      US'    U R                  R                  UUS9nUR	                  5       nUR
                  S:X  d  UR
                  S:X  aQ  [        U5      (       d,  UR                  R                  S5      nUb  [        U5      nOSnU R                  US-  5        OEUR
                  S	:X  d  UR
                  S
:X  a  U$ [        (       a  [        UR
                  5        OU$ M  )Wait for the vector store file to finish processing.

Note: this will return even if the file failed to process, you need to check
file.last_error and file.status to handle these cases
X-Stainless-Poll-Helpertrue X-Stainless-Custom-Poll-IntervalrE   in_progressqueuedopenai-poll-after-ms  	completedfailedr,   rX   r8   retrieveparsestatusheadersgetint_sleepr   r   r6   video_idr`   r|   responseri   from_headers          r7   rf   Videos.poll   s     $=f"E$%%:=>N:OG67--66% 7 H
 NN$E||},0H 011"*"2"2"6"67M"NK".+.{+;(+/(,t34,0H = . L- r:   rR   c          
     n    U(       d  [        SU< 35      eU R                  SU 3[        X#XES9[        S9$ )  
Retrieve a video

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds
7Expected a non-empty value for `video_id` but received /videos/rR   rV   rW   
ValueError_getr+   r)   r6   r   rE   rF   rG   rH   s         r7   ry   Videos.retrieve   sO    . VW_Vbcddyyxj!(+Q[   
 	
r:   afterlimitorderrE   rF   rG   rH   c                   U R                  S[        [           [        UUUU[	        UUUS.[
        R                  5      S9[        S9$ a  
List videos

Args:
  after: Identifier for the last item from the previous pagination request

  limit: Number of items to retrieve

  order: Sort order of results by timestamp. Use `asc` for ascending order or `desc` for
      descending order.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds
rQ   )r   r   r   rE   rF   rG   rH   query)pagerV   rB   )_get_api_listr'   r)   r+   r   r   VideoListParamsr6   r   r   r   rE   rF   rG   rH   s           r7   listVideos.list   sb    @ !!+E2(+'%%!&!&!&
 &55 # " 
 	
r:   c          
     n    U(       d  [        SU< 35      eU R                  SU 3[        X#XES9[        S9$ )
  
Delete a video

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds
r   r   rR   r   r   _deleter+   r-   r   s         r7   deleteVideos.delete  sO    . VW_Vbcdd||xj!(+Q[ (  
 	
r:   variantrE   rF   rG   rH   c                   U(       d  [        SU< 35      eSS0U=(       d    0 EnU R                  SU S3[        UUUU[        SU0[        R
                  5      S9[        R                  S9$ )	]  Download video content

Args:
  variant: Which downloadable asset to return.

Defaults to the MP4 video.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds
r   Acceptapplication/binaryr   /contentr   r   r   )r   r   r+   r   r   VideoDownloadContentParamsr
   HttpxBinaryResponseContentr6   r   r   rE   rF   rG   rH   s          r7   download_contentVideos.download_content=  s    6 VW_Vbcdd!#7QM<ORQyyxj)(+'%%y'&:<Y<t<tu %??  

 
	
r:   c                   U(       d  [        SU< 35      eU R                  SU S3[        SU0[        R                  5      [        X4XVS9[        S9$ )R  
Create a video remix

Args:
  prompt: Updated text prompt that directs the remix generation.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds
r   r   /remixrL   rR   rT   rV   rW   )r   rZ   r   r   VideoRemixParamsr+   r)   r6   r   rL   rE   rF   rG   rH   s          r7   remixVideos.remixg  sg    4 VW_Vbcddzzxj' (F!35G5X5XY(+Q[   
 	
r:    )returnr4   )r   r=   rL   rX   rA   FileTypes | OmitrB   VideoModel | OmitrC   VideoSeconds | OmitrD   VideoSize | OmitrE   Headers | NonerF   Query | NonerG   Body | NonerH   'float | httpx.Timeout | None | NotGivenr   r)   rL   rX   rA   r   rB   r   rC   r   rD   r   r`   
int | OmitrE   r   rF   r   rG   r   rH   r   r   r)   r   rX   r`   r   r   r)   r   rX   rE   r   rF   r   rG   r   rH   r   r   r)   )r   
str | Omitr   r   r   Literal['asc', 'desc'] | OmitrE   r   rF   r   rG   r   rH   r   r   z!SyncConversationCursorPage[Video]r   rX   rE   r   rF   r   rG   r   rH   r   r   r-   r   rX   r   z3Literal['video', 'thumbnail', 'spritesheet'] | OmitrE   r   rF   r   rG   r   rH   r   r   z+_legacy_response.HttpxBinaryResponseContentr   rX   rL   rX   rE   r   rF   r   rG   r   rH   r   r   r)   __name__
__module____qualname____firstlineno__r   r8   r>   r   r   r]   rj   rf   ry   r   r   r   r   __static_attributes__r   r:   r7   r.   r.   ,   s/   + + 1 1 -1#''+!% )-$("&;D<
 <
 *	<

 !<
 %<
 <
 &<
 "<
  <
 9<
 
<
D -1#''+!%'+ )-$("&;D 
  
 *	 

 ! 
 % 
  
 % 
 & 
 " 
   
 9 
 
 
L (,	%!%! %	%!
 
%!Z )-$("&;D

 &
 "
  
 9
 

H ! /3 )-$("&;D2
 2
 	2

 -2
 &2
 "2
  2
 92
 
+2
t )-$("&;D

 &
 "
  
 9
 

J HL )-$("&;D(
(
 E	(
 &(
 "(
  (
 9(
 
5(
b )-$("&;D#
#
 	#
 &#
 "#
  #
 9#
 
#
 #
r:   c            
         \ rS rSr\SS j5       r\SS j5       r\\\\SSS\S.                   SS jjr	\\\\\SSS\S.	                     SS jjr
\S	.     SS
 jjrSSS\S.           SS jjr\\\SSS\S.               SS jjrSSS\S.           SS jjr\SSS\S.             SS jjrSSS\S.             SS jjrSrg)r/   i  c                    [        U 5      $ r3   )AsyncVideosWithRawResponser5   s    r7   r8   AsyncVideos.with_raw_response  s     *$//r:   c                    [        U 5      $ r<   ) AsyncVideosWithStreamingResponser5   s    r7   r>   #AsyncVideos.with_streaming_response  s     055r:   Nr@   c       	        <  #    [        UUUUUS.5      n
[        [        [        [        [
        4   U
5      S//S9nU(       a  SS0U=(       d    0 EnU R                  S[        U
[        R                  5      I Sh  vN U[        XgXS9[        S	9I Sh  vN $  N N7f)
rJ   rK   rA   rM   rO   rP   rQ   NrR   rS   )r   r   r   r   rX   rY   rZ   r   r   r[   r+   r)   r\   s               r7   r]   AsyncVideos.create  s     J   #2"
 d73;#7>HYGZF[\ ,-B\}GZXZ\MZZ,T3F3X3XYY(+Q[    
 
 	
Y
s$   A8B:B
;BBBBr_   c       
           #    U R                  UUUUUUUU	U
S9	I Sh  vN nU R                  UR                  US9I Sh  vN $  N& N7f)rb   rc   Nrd   re   rh   s               r7   rj   AsyncVideos.create_and_poll  sk     " kk+'#! " 

 

 YYHH-  
 
 	



s    AA!AA AArd   c               <  #    SS0n[        U5      (       a  [        U5      US'    U R                  R                  UUS9I Sh  vN nUR	                  5       nUR
                  S:X  d  UR
                  S:X  aY  [        U5      (       d,  UR                  R                  S5      nUb  [        U5      nOS	nU R                  US	-  5      I Sh  vN   OEUR
                  S
:X  d  UR
                  S:X  a  U$ [        (       a  [        UR
                  5        OU$ M   N NN7f)rm   rn   ro   rp   rq   Nrr   rs   rt   ru   rv   rw   rx   r   s          r7   rf   AsyncVideos.poll  s     $=f"E$%%:=>N:OG67!33<<% =  H
 NN$E||},0H 011"*"2"2"6"67M"NK".+.{+;(+/(kk"2T"9:::,0H = . L-  ;s&   ADDBDDADDrR   c          
        #    U(       d  [        SU< 35      eU R                  SU 3[        X#XES9[        S9I Sh  vN $  N7f)r   r   r   rR   r   Nr   r   s         r7   ry   AsyncVideos.retrieve(  s\     . VW_VbcddYYxj!(+Q[   
 
 	
 
   :AAAr   c                   U R                  S[        [           [        UUUU[	        UUUS.[
        R                  5      S9[        S9$ r   )r   r(   r)   r+   r   r   r   r   s           r7   r   AsyncVideos.listI  sb    @ !!,U3(+'%%!&!&!&
 &55 # " 
 	
r:   c          
        #    U(       d  [        SU< 35      eU R                  SU 3[        X#XES9[        S9I Sh  vN $  N7f)r   r   r   rR   r   Nr   r   s         r7   r   AsyncVideos.delete}  s\     . VW_Vbcdd\\xj!(+Q[ ( " 
 
 	
 
r   r   c                 #    U(       d  [        SU< 35      eSS0U=(       d    0 EnU R                  SU S3[        UUUU[        SU0[        R
                  5      I Sh  vN S9[        R                  S	9I Sh  vN $  N N7f)
r   r   r   r   r   r   r   Nr   r   )r   r   r+   r   r   r   r
   r   r   s          r7   r   AsyncVideos.download_content  s     6 VW_Vbcdd!#7QM<ORQYYxj)(+'%1(*G*b*b  %??  
 
 	

s$   AB B !B;B<BBc                  #    U(       d  [        SU< 35      eU R                  SU S3[        SU0[        R                  5      I Sh  vN [        X4XVS9[        S9I Sh  vN $  N N7f)r   r   r   r   rL   NrR   r   )r   rZ   r   r   r   r+   r)   r   s          r7   r   AsyncVideos.remix  sz     4 VW_VbcddZZxj',h-?ASAdAdee(+Q[    
 
 	
e
s$   AA)A%
	A) A'!A)'A)r   )r   r   )r   r   r   r   r   r   )r   r   r   r   r   r   rE   r   rF   r   rG   r   rH   r   r   z9AsyncPaginator[Video, AsyncConversationCursorPage[Video]]r   r   r   r   r   r:   r7   r/   r/     s0   0 0 6 6 -1#''+!% )-$("&;D<
 <
 *	<

 !<
 %<
 <
 &<
 "<
  <
 9<
 
<
D -1#''+!%'+ )-$("&;D 
  
 *	 

 ! 
 % 
  
 % 
 & 
 " 
   
 9 
 
 
L (,	%!%! %	%!
 
%!Z )-$("&;D

 &
 "
  
 9
 

H ! /3 )-$("&;D2
 2
 	2

 -2
 &2
 "2
  2
 92
 
C2
t )-$("&;D

 &
 "
  
 9
 

J HL )-$("&;D*
*
 E	*
 &*
 "*
  *
 9*
 
5*
f )-$("&;D#
#
 	#
 &#
 "#
  #
 9#
 
#
 #
r:   c                      \ rS rSrSS jrSrg)r4   i  c                   Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        g N)	_videosr
   to_raw_response_wrapperr]   ry   r   r   r   r   r6   videoss     r7   __init__VideosWithRawResponse.__init__  s    &>>MM
 )@@OO
 %<<KK
	 '>>MM
 !1 H H##!
 &==LL

r:   r   r]   r   r   r   r   ry   Nr   r.   r   Noner   r   r   r   r   r   r   r:   r7   r4   r4         
r:   r4   c                      \ rS rSrSS jrSrg)r   i  c                   Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        g r   )	r   r
   async_to_raw_response_wrapperr]   ry   r   r   r   r   r   s     r7   r   #AsyncVideosWithRawResponse.__init__	  s    &DDMM
 )FFOO
 %BBKK
	 'DDMM
 !1 N N##!
 &CCLL

r:   r   Nr   r/   r   r   r   r   r:   r7   r   r     r   r:   r   c                      \ rS rSrSS jrSrg)r=   i   c                R   Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        [        UR                  [        5      U l        [        UR                  5      U l	        g r   )
r   r#   r]   ry   r   r   r%   r   r!   r   r   s     r7   r   $VideosWithStreamingResponse.__init__!  s    2MM
 5OO
 1KK
	 3MM
 !D##%!
 2LL

r:   r   Nr   r   r   r:   r7   r=   r=          
r:   r=   c                      \ rS rSrSS jrSrg)r   i9  c                R   Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        [        UR                  [        5      U l        [        UR                  5      U l	        g r   )
r   r$   r]   ry   r   r   r&   r   r"   r   r   s     r7   r   )AsyncVideosWithStreamingResponse.__init__:  s    8MM
 ;OO
 7KK
	 9MM
 !J##*!
 8LL

r:   r   Nr   r   r   r:   r7   r   r   9  r   r:   r   )D
__future__r   typingr   r   r   typing_extensionsr   r   httpx r
   typesr   r   r   r   r   r   r   _typesr   r   r   r   r   r   r   r   _utilsr   r   r   r   _compatr   	_resourcer   r    	_responser!   r"   r#   r$   r%   r&   
paginationr'   r(   types.videor)   _base_clientr*   r+   _utils._utilsr,   types.video_sizetypes.video_modeltypes.video_secondstypes.video_delete_responser-   __all__r.   r/   r4   r   r=   r   r   r:   r7   <module>r     s    # / / 3     V U U \ \ % 9  Q  ? $ ( * . =]
#^
_ ^
B`
" `
F
 
0
 
0
 
2
 
r:   