CreatePredictionForFluxPro

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using var api = new ReplicateApi(apiKey);

var seed = Random.Shared.Next(0, 1000000);
var endResponse = await api.ModelsPredictionsCreateAsync(
    input: new Dictionary<string, object>
    {
        ["seed"] = seed,
        ["steps"] = 25,
        ["prompt"] = "a female, european, young adult, fit body, wavy acid orange hair, wearing open swimsuit, sea in the background.",
        ["guidance"] = 3.5,
        ["interval"] = 3,
        ["aspect_ratio"] = "16:9",
        ["safety_tolerance"] = 5,
    },
    modelOwner: "black-forest-labs",
    modelName: "flux-pro",
    stream: false,
    prefer: "wait=60",
    webhook: "https://hook.eu2.make.com/h6tawmpxsmxb7ut4edfmje4g3xw8y8rf",
    webhookEventsFilter: null);

Console.WriteLine($"Seed: {seed}.");
Console.WriteLine("Image available at:");
Console.WriteLine(endResponse?.Output);

output