MCPcopy
hub / github.com/openai/openai-python / retrieve

Method retrieve

src/openai/resources/videos.py:789–824  ·  view source on GitHub ↗

Fetch the latest metadata for a generated 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-lev

(
        self,
        video_id: str,
        *,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = not_given,
    )

Source from the content-addressed store, hash-verified

787 return video
788
789 async def retrieve(
790 self,
791 video_id: str,
792 *,
793 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
794 # The extra values given here take precedence over values defined on the client or passed to this method.
795 extra_headers: Headers | None = None,
796 extra_query: Query | None = None,
797 extra_body: Body | None = None,
798 timeout: float | httpx.Timeout | None | NotGiven = not_given,
799 ) -> Video:
800 """
801 Fetch the latest metadata for a generated video.
802
803 Args:
804 extra_headers: Send extra headers
805
806 extra_query: Add additional query parameters to the request
807
808 extra_body: Add additional JSON properties to the request
809
810 timeout: Override the client-level default timeout for this request, in seconds
811 """
812 if not video_id:
813 raise ValueError(f"Expected a non-empty value for `video_id` but received {video_id!r}")
814 return await self._get(
815 path_template("/videos/{video_id}", video_id=video_id),
816 options=make_request_options(
817 extra_headers=extra_headers,
818 extra_query=extra_query,
819 extra_body=extra_body,
820 timeout=timeout,
821 security={"bearer_auth": True},
822 ),
823 cast_to=Video,
824 )
825
826 def list(
827 self,

Callers

nothing calls this directly

Calls 2

path_templateFunction · 0.85
make_request_optionsFunction · 0.85

Tested by

no test coverage detected