Closed lzell closed 2 months ago
let replicateService = AIProxy.replicateService( partialKey: "partial-key-from-your-developer-dashboard", serviceURL: "service-url-from-your-developer-dashboard" ) do { let input = ReplicateFluxDevInputSchema( prompt: "Monument valley, Utah. High res" ) let output = try await replicateService.createFluxDevImage( input: input ) print("Done creating Flux-Dev image: ", output.first ?? "") } catch AIProxyError.unsuccessfulRequest(let statusCode, let responseBody) { print("Received non-200 status code: \(statusCode) with response body: \(responseBody)") } catch { print("Could not create Flux-Dev image: \(error.localizedDescription)") }
See the full range of controls for generating an image by viewing ReplicateFluxDevInputSchema.swift
ReplicateFluxDevInputSchema.swift
import AIProxy let replicateService = AIProxy.replicateService( partialKey: "partial-key-from-your-developer-dashboard", serviceURL: "service-url-from-your-developer-dashboard" ) do { let input = ReplicateFluxProInputSchema( prompt: "Monument valley, Utah. High res" ) let output = try await replicateService.createFluxProImage( input: input ) print("Done creating Flux-Pro image: ", output.first ?? "") } catch AIProxyError.unsuccessfulRequest(let statusCode, let responseBody) { print("Received non-200 status code: \(statusCode) with response body: \(responseBody)") } catch { print("Could not create Flux-Pro image: \(error.localizedDescription)") }
See the full range of controls for generating an image by viewing ReplicateFluxProInputSchema.swift
ReplicateFluxProInputSchema.swift
How to generate a Flux-Dev image by Black Forest Labs, using Replicate
See the full range of controls for generating an image by viewing
ReplicateFluxDevInputSchema.swift
How to generate a Flux-Pro image by Black Forest Labs, using Replicate
See the full range of controls for generating an image by viewing
ReplicateFluxProInputSchema.swift