Skip to content

Commit 72c815f

Browse files
first commit
1 parent 9af33c2 commit 72c815f

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,6 +1123,49 @@ Detailed settings on the [official documentation](https://platform.stability.ai/
11231123
Use [**Stable Video Diffusion**](https://static1.squarespace.com/static/6213c340453c3f502425776e/t/655ce779b9d47d342a93c890/1700587395994/stable_video_diffusion.pdf), a latent video diffusion model, to generate a short video from an initial image.
11241124
- After calling this endpoint with the required parameters, retrieve the `ID` from the response to check the results at the `image-to-video/result/{id}` endpoint. Be sure not to poll this endpoint more than once every 10 seconds to avoid errors or rate-limiting issues.
11251125

1126+
```Pascal
1127+
//uses
1128+
// StabilityAI, StabilityAI.Types, StabilityAI.Common, FMX.Stability.Tutorial,
1129+
// StabilityAI.VideoAnd3D.Video;
1130+
1131+
Stability.VideoAnd3D.ImageToVideo.Generation(
1132+
procedure (Params: TVideo)
1133+
begin
1134+
Params.Image('lighthouse1024x576.png');
1135+
end,
1136+
function : TAsynJobVideo
1137+
begin
1138+
Result.Sender := StabilityResult;
1139+
Result.OnStart := Start;
1140+
Result.OnSuccess := Display;
1141+
Result.OnError := Display;
1142+
end);
1143+
```
1144+
1145+
At the end, we retrieve the ID (*e.g. d4fb4aa8301aee0b368a41b3c0a78018dfc28f1f959a3666be2e6951408fb8e3*) of the video creation task. Then, we simply retrieve the result in this way.
1146+
1147+
Detailed settings on the [official documentation](https://platform.stability.ai/docs/api-reference#tag/Image-to-Video/paths/~1v2beta~1image-to-video/post)
1148+
1149+
```Pascal
1150+
//uses
1151+
// StabilityAI, StabilityAI.Types, StabilityAI.Common, FMX.Stability.Tutorial,
1152+
// StabilityAI.VideoAnd3D.Video;
1153+
1154+
var Id := 'd4fb4aa8301aee0b368a41b3c0a78018dfc28f1f959a3666be2e6951408fb8e3';
1155+
StabilityResult.FileName := 'lighthouse1024x576.mp4';
1156+
1157+
Stability.VideoAnd3D.ImageToVideo.Fetch(Id,
1158+
function : TAsynResults
1159+
begin
1160+
Result.Sender := StabilityResult;
1161+
Result.OnStart := Start;
1162+
Result.OnSuccess := Display;
1163+
Result.OnError := Display;
1164+
end);
1165+
```
1166+
1167+
Detailed settings on the [official documentation](https://platform.stability.ai/docs/api-reference#tag/Image-to-Video/paths/~1v2beta~1image-to-video~1result~1%7Bid%7D/get)
1168+
11261169
<br/>
11271170

11281171
# Contributing

0 commit comments

Comments
 (0)