All URIs are relative to https://dream-gateway.livepeer.cloud
Method | HTTP request | Description |
---|---|---|
ImageToImage | Post /image-to-image | Image To Image |
ImageToVideo | Post /image-to-video | Image To Video |
TextToImage | Post /text-to-image | Text To Image |
Upscale | Post /upscale | Upscale |
ImageResponse ImageToImage(ctx).Prompt(prompt).Image(image).ModelId(modelId).Strength(strength).GuidanceScale(guidanceScale).ImageGuidanceScale(imageGuidanceScale).NegativePrompt(negativePrompt).SafetyCheck(safetyCheck).Seed(seed).NumImagesPerPrompt(numImagesPerPrompt).Execute()
Image To Image
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
prompt := "prompt_example" // string |
image := os.NewFile(1234, "some_file") // *os.File |
modelId := "modelId_example" // string | (default to "")
strength := float32(8.14) // float32 | (optional) (default to 0.8)
guidanceScale := float32(8.14) // float32 | (optional) (default to 7.5)
imageGuidanceScale := float32(8.14) // float32 | (optional) (default to 1.5)
negativePrompt := "negativePrompt_example" // string | (optional) (default to "")
safetyCheck := true // bool | (optional) (default to true)
seed := int32(56) // int32 | (optional)
numImagesPerPrompt := int32(56) // int32 | (optional) (default to 1)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DefaultAPI.ImageToImage(context.Background()).Prompt(prompt).Image(image).ModelId(modelId).Strength(strength).GuidanceScale(guidanceScale).ImageGuidanceScale(imageGuidanceScale).NegativePrompt(negativePrompt).SafetyCheck(safetyCheck).Seed(seed).NumImagesPerPrompt(numImagesPerPrompt).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.ImageToImage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ImageToImage`: ImageResponse
fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.ImageToImage`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiImageToImageRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
prompt | string | ||
image | *os.File | ||
modelId | string | [default to ""] | |
strength | float32 | [default to 0.8] | |
guidanceScale | float32 | [default to 7.5] | |
imageGuidanceScale | float32 | [default to 1.5] | |
negativePrompt | string | [default to ""] | |
safetyCheck | bool | [default to true] | |
seed | int32 | ||
numImagesPerPrompt | int32 | [default to 1] |
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VideoResponse ImageToVideo(ctx).Image(image).ModelId(modelId).Height(height).Width(width).Fps(fps).MotionBucketId(motionBucketId).NoiseAugStrength(noiseAugStrength).Seed(seed).SafetyCheck(safetyCheck).Execute()
Image To Video
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
image := os.NewFile(1234, "some_file") // *os.File |
modelId := "modelId_example" // string | (default to "")
height := int32(56) // int32 | (optional) (default to 576)
width := int32(56) // int32 | (optional) (default to 1024)
fps := int32(56) // int32 | (optional) (default to 6)
motionBucketId := int32(56) // int32 | (optional) (default to 127)
noiseAugStrength := float32(8.14) // float32 | (optional) (default to 0.02)
seed := int32(56) // int32 | (optional)
safetyCheck := true // bool | (optional) (default to true)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DefaultAPI.ImageToVideo(context.Background()).Image(image).ModelId(modelId).Height(height).Width(width).Fps(fps).MotionBucketId(motionBucketId).NoiseAugStrength(noiseAugStrength).Seed(seed).SafetyCheck(safetyCheck).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.ImageToVideo``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ImageToVideo`: VideoResponse
fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.ImageToVideo`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiImageToVideoRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
image | *os.File | ||
modelId | string | [default to ""] | |
height | int32 | [default to 576] | |
width | int32 | [default to 1024] | |
fps | int32 | [default to 6] | |
motionBucketId | int32 | [default to 127] | |
noiseAugStrength | float32 | [default to 0.02] | |
seed | int32 | ||
safetyCheck | bool | [default to true] |
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ImageResponse TextToImage(ctx).TextToImageParams(textToImageParams).Execute()
Text To Image
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
textToImageParams := *openapiclient.NewTextToImageParams("ModelId_example", "Prompt_example") // TextToImageParams |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DefaultAPI.TextToImage(context.Background()).TextToImageParams(textToImageParams).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.TextToImage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TextToImage`: ImageResponse
fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.TextToImage`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiTextToImageRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
textToImageParams | TextToImageParams |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ImageResponse Upscale(ctx).Prompt(prompt).Image(image).ModelId(modelId).SafetyCheck(safetyCheck).Seed(seed).Execute()
Upscale
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
prompt := "prompt_example" // string |
image := os.NewFile(1234, "some_file") // *os.File |
modelId := "modelId_example" // string | (default to "")
safetyCheck := true // bool | (optional) (default to true)
seed := int32(56) // int32 | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DefaultAPI.Upscale(context.Background()).Prompt(prompt).Image(image).ModelId(modelId).SafetyCheck(safetyCheck).Seed(seed).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.Upscale``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Upscale`: ImageResponse
fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.Upscale`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiUpscaleRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
prompt | string | ||
image | *os.File | ||
modelId | string | [default to ""] | |
safetyCheck | bool | [default to true] | |
seed | int32 |
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]