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

Method remix

src/openai/resources/videos.py:1167–1206  ·  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

1165 )
1166
1167 async def remix(
1168 self,
1169 video_id: str,
1170 *,
1171 prompt: str,
1172 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1173 # The extra values given here take precedence over values defined on the client or passed to this method.
1174 extra_headers: Headers | None = None,
1175 extra_query: Query | None = None,
1176 extra_body: Body | None = None,
1177 timeout: float | httpx.Timeout | None | NotGiven = not_given,
1178 ) -> Video:
1179 """
1180 Create a remix of a completed video using a refreshed prompt.
1181
1182 Args:
1183 prompt: Updated text prompt that directs the remix generation.
1184
1185 extra_headers: Send extra headers
1186
1187 extra_query: Add additional query parameters to the request
1188
1189 extra_body: Add additional JSON properties to the request
1190
1191 timeout: Override the client-level default timeout for this request, in seconds
1192 """
1193 if not video_id:
1194 raise ValueError(f"Expected a non-empty value for `video_id` but received {video_id!r}")
1195 return await self._post(
1196 path_template("/videos/{video_id}/remix", video_id=video_id),
1197 body=await async_maybe_transform({"prompt": prompt}, video_remix_params.VideoRemixParams),
1198 options=make_request_options(
1199 extra_headers=extra_headers,
1200 extra_query=extra_query,
1201 extra_body=extra_body,
1202 timeout=timeout,
1203 security={"bearer_auth": True},
1204 ),
1205 cast_to=Video,
1206 )
1207
1208
1209class VideosWithRawResponse:

Callers

nothing calls this directly

Calls 3

path_templateFunction · 0.85
async_maybe_transformFunction · 0.85
make_request_optionsFunction · 0.85

Tested by

no test coverage detected