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

Method remix

src/openai/resources/videos.py:586–625  ·  view source on GitHub ↗

Create a remix of a completed video using a refreshed prompt. 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: Ad

(
        self,
        video_id: str,
        *,
        prompt: 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

584 )
585
586 def remix(
587 self,
588 video_id: str,
589 *,
590 prompt: str,
591 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
592 # The extra values given here take precedence over values defined on the client or passed to this method.
593 extra_headers: Headers | None = None,
594 extra_query: Query | None = None,
595 extra_body: Body | None = None,
596 timeout: float | httpx.Timeout | None | NotGiven = not_given,
597 ) -> Video:
598 """
599 Create a remix of a completed video using a refreshed prompt.
600
601 Args:
602 prompt: Updated text prompt that directs the remix generation.
603
604 extra_headers: Send extra headers
605
606 extra_query: Add additional query parameters to the request
607
608 extra_body: Add additional JSON properties to the request
609
610 timeout: Override the client-level default timeout for this request, in seconds
611 """
612 if not video_id:
613 raise ValueError(f"Expected a non-empty value for `video_id` but received {video_id!r}")
614 return self._post(
615 path_template("/videos/{video_id}/remix", video_id=video_id),
616 body=maybe_transform({"prompt": prompt}, video_remix_params.VideoRemixParams),
617 options=make_request_options(
618 extra_headers=extra_headers,
619 extra_query=extra_query,
620 extra_body=extra_body,
621 timeout=timeout,
622 security={"bearer_auth": True},
623 ),
624 cast_to=Video,
625 )
626
627
628class AsyncVideos(AsyncAPIResource):

Calls 3

path_templateFunction · 0.85
maybe_transformFunction · 0.85
make_request_optionsFunction · 0.85

Tested by 8

test_method_remixMethod · 0.36
test_method_remixMethod · 0.36