Versions in this module Expand all Collapse all v1 v1.0.1 Oct 10, 2025 v1.0.0 Oct 10, 2025 Changes in this version + func NewAuthenticationError(message string) error + func NewRateLimitError(message string) error + func NewTimeoutError(message string) error + type AIPhotos struct + func NewAIPhotos(httpClient *HTTPClient) *AIPhotos + func (a *AIPhotos) Generate(params AIPhotosGenerateParams) (*TaskResponse, error) + func (a *AIPhotos) Train(params AIPhotosTrainParams) (*TaskResponse, error) + func (a *AIPhotos) Upload(params AIPhotosUploadParams) (*TaskResponse, error) + type AIPhotosGenerateParams struct + AspectRatio string + Height string + NumberOfImages string + Prompt string + Seed *int + TrainingID string + Width string + type AIPhotosTrainParams struct + TrainingImagesID string + TriggerWord string + WebhookSecret string + WebhookURL string + type AIPhotosUploadParams struct + Age int + Ethnicity string + Gender string + Images []string + WebhookSecret string + WebhookURL string + type AccountInfo struct + Credits int + Email string + Plan string + TotalImages int + type AuthenticationError struct + Err *Error + func (e *AuthenticationError) Error() string + type Client struct + AIPhotos *AIPhotos + Flux *Flux + Ideogram *Ideogram + Kling *Kling + Luma *Luma + Media *Media + Midjourney *Midjourney + MidjourneyAlt *MidjourneyAlt + Runway *Runway + Suno *Suno + Tasks *Tasks + Udio *Udio + func NewClient(config Config) (*Client, error) + type Config struct + APIKey string + BaseURL string + Timeout int + type Error struct + Code string + Details interface{} + Message string + Status int + func NewError(message string, code string, status int, details interface{}) *Error + func (e *Error) Error() string + type Flux struct + func NewFlux(httpClient *HTTPClient) *Flux + func (f *Flux) Generate(params FluxGenerateParams) (*TaskResponse, error) + func (f *Flux) GenerateDev(params FluxGenerateParams) (*TaskResponse, error) + func (f *Flux) GeneratePro(params FluxGenerateParams) (*TaskResponse, error) + func (f *Flux) GenerateSchnell(params FluxGenerateParams) (*TaskResponse, error) + type FluxGenerateParams struct + AspectRatio string + Guidance *float64 + Height *int + ImagePrompt string + ImagePromptStrength *float64 + Interval *int + Model string + Prompt string + PromptUpsampling *bool + Raw *bool + SafetyTolerance *int + Seed *int + Steps *int + WebhookSecret string + WebhookURL string + Width *int + type HTTPClient struct + func NewHTTPClient(config Config) (*HTTPClient, error) + func (h *HTTPClient) Delete(url string, result interface{}) error + func (h *HTTPClient) Get(url string, result interface{}) error + func (h *HTTPClient) Patch(url string, body interface{}, result interface{}) error + func (h *HTTPClient) Post(url string, body interface{}, result interface{}) error + func (h *HTTPClient) PostFormData(url string, formData map[string]interface{}, result interface{}) error + func (h *HTTPClient) Put(url string, body interface{}, result interface{}) error + func (h *HTTPClient) SetFileBytes(url string, fieldName string, fileName string, fileBytes []byte, ...) error + type Ideogram struct + func NewIdeogram(httpClient *HTTPClient) *Ideogram + func (i *Ideogram) Describe(params IdeogramDescribeParams) (*TaskResponse, error) + func (i *Ideogram) Generate(params IdeogramGenerateParams) (*TaskResponse, error) + func (i *Ideogram) Remix(params IdeogramRemixParams) (*TaskResponse, error) + func (i *Ideogram) Upscale(params IdeogramUpscaleParams) (*TaskResponse, error) + type IdeogramDescribeParams struct + ImageURL string + type IdeogramGenerateParams struct + AspectRatio string + MagicPromptOption string + NegativePrompt string + Prompt string + Resolution string + Seed *int + StyleType string + type IdeogramRemixParams struct + AspectRatio string + ImageURL string + ImageWeight int + MagicPromptOption string + NegativePrompt string + Prompt string + Resolution string + Seed *int + StyleType string + type IdeogramUpscaleParams struct + Detail *int + ImageURL string + MagicPromptOption string + Prompt string + Resemblance int + Seed *int + type Kling struct + func NewKling(httpClient *HTTPClient) *Kling + func (k *Kling) Generate(params KlingGenerateParams) (*TaskResponse, error) + func (k *Kling) ImageToVideo(imageURL string, prompt string, model string, mode string, duration int) (*TaskResponse, error) + func (k *Kling) TextToVideo(prompt string, aspectRatio string, model string, duration int) (*TaskResponse, error) + func (k *Kling) Tryon(params KlingTryonParams) (*TaskResponse, error) + type KlingGenerateParams struct + AspectRatio string + CFGScale *float64 + Duration *int + EndImageURL string + GenerationType string + ImageURL string + Mode string + Model string + NegativePrompt string + Prompt string + WebhookSecret string + WebhookURL string + type KlingTryonParams struct + ClothImageURL string + HumanImageURL string + Model string + WebhookSecret string + WebhookURL string + type Luma struct + func NewLuma(httpClient *HTTPClient) *Luma + func (l *Luma) Extend(params LumaExtendParams) (*TaskResponse, error) + func (l *Luma) Generate(params LumaGenerateParams) (*TaskResponse, error) + type LumaExtendParams struct + AspectRatio string + EndImageURL string + EnhancePrompt *bool + ImageURL string + ParentTaskID string + Prompt string + WebhookSecret string + WebhookURL string + type LumaGenerateParams struct + AspectRatio string + EndImageURL string + EnhancePrompt *bool + ImageURL string + Loop *bool + Prompt string + WebhookSecret string + WebhookURL string + type Media struct + func NewMedia(httpClient *HTTPClient) *Media + func (m *Media) Upload(filePath string, fileBytes []byte) (*MediaUploadResponse, error) + func (m *Media) UploadAudio(filePath string, fileBytes []byte) (*MediaUploadAudioResponse, error) + type MediaUploadAudioResponse struct + AudioURL string + type MediaUploadResponse struct + ImageURL string + type Midjourney struct + func NewMidjourney(httpClient *HTTPClient) *Midjourney + func (m *Midjourney) Blend(params MidjourneyBlendParams) (*TaskResponse, error) + func (m *Midjourney) Describe(params MidjourneyDescribeParams) (*TaskResponse, error) + func (m *Midjourney) ExtendVideo(params MidjourneyExtendVideoParams) (*TaskResponse, error) + func (m *Midjourney) FaceSwap(params MidjourneyFaceSwapParams) (*TaskResponse, error) + func (m *Midjourney) Imagine(params MidjourneyImagineParams) (*TaskResponse, error) + func (m *Midjourney) ImagineVideo(params MidjourneyImagineVideoParams) (*TaskResponse, error) + func (m *Midjourney) Inpaint(params MidjourneyInpaintParams) (*TaskResponse, error) + func (m *Midjourney) Outpaint(params MidjourneyOutpaintParams) (*TaskResponse, error) + func (m *Midjourney) Pan(params MidjourneyPanParams) (*TaskResponse, error) + func (m *Midjourney) Reroll(params MidjourneyRerollParams) (*TaskResponse, error) + func (m *Midjourney) Seed(params MidjourneySeedParams) (*TaskResponse, error) + func (m *Midjourney) Shorten(params MidjourneyShortenParams) (*TaskResponse, error) + func (m *Midjourney) Upscale(params MidjourneyUpscaleParams) (*TaskResponse, error) + func (m *Midjourney) Upscale1x(params MidjourneyUpscale1xParams) (*TaskResponse, error) + func (m *Midjourney) UpscaleAlt(params MidjourneyUpscaleAltParams) (*TaskResponse, error) + func (m *Midjourney) UpscaleHighres(params MidjourneyUpscaleHighresParams) (*TaskResponse, error) + func (m *Midjourney) Variations(params MidjourneyVariationsParams) (*TaskResponse, error) + func (m *Midjourney) Vary(params MidjourneyVaryParams) (*TaskResponse, error) + func (m *Midjourney) Zoom(params MidjourneyZoomParams) (*TaskResponse, error) + type MidjourneyAlt struct + func NewMidjourneyAlt(httpClient *HTTPClient) *MidjourneyAlt + func (m *MidjourneyAlt) GetAccountInfo() (map[string]interface{}, error) + func (m *MidjourneyAlt) GetGeneration(generationID string) (*TaskResponse, error) + func (m *MidjourneyAlt) Imagine(params MidjourneyAltImagineParams) (*TaskResponse, error) + func (m *MidjourneyAlt) Pan(params MidjourneyAltPanParams) (*TaskResponse, error) + func (m *MidjourneyAlt) Upscale(params MidjourneyAltUpscaleParams) (*TaskResponse, error) + func (m *MidjourneyAlt) Variations(params MidjourneyAltVariationsParams) (*TaskResponse, error) + func (m *MidjourneyAlt) Vary(params MidjourneyAltVaryParams) (*TaskResponse, error) + func (m *MidjourneyAlt) Zoom(params MidjourneyAltZoomParams) (*TaskResponse, error) + type MidjourneyAltImagineParams struct + Mode string + Prompt string + WebhookSecret string + WebhookURL string + type MidjourneyAltPanParams struct + Index string + ParentTaskID string + Type string + WebhookSecret string + WebhookURL string + type MidjourneyAltUpscaleParams struct + Index string + ParentTaskID string + Type string + WebhookSecret string + WebhookURL string + type MidjourneyAltVariationsParams struct + Index string + ParentTaskID string + WebhookSecret string + WebhookURL string + type MidjourneyAltVaryParams struct + Index string + ParentTaskID string + Type string + WebhookSecret string + WebhookURL string + type MidjourneyAltZoomParams struct + Index string + ParentTaskID string + Type string + WebhookSecret string + WebhookURL string + type MidjourneyBlendParams struct + Dimension string + ImageURLs []string + WebhookSecret string + WebhookURL string + type MidjourneyDescribeParams struct + ImageURL string + WebhookSecret string + WebhookURL string + type MidjourneyExtendVideoParams struct + ImageURL string + Index string + Motion string + ParentTaskID string + Prompt string + WebhookSecret string + WebhookURL string + type MidjourneyFaceSwapParams struct + SwapImageURL string + TargetImageURL string + WebhookSecret string + WebhookURL string + type MidjourneyImagineParams struct + AspectRatio string + Prompt string + WebhookSecret string + WebhookURL string + type MidjourneyImagineVideoParams struct + ImageURL string + Motion string + Prompt string + WebhookSecret string + WebhookURL string + type MidjourneyInpaintParams struct + Mask string + ParentTaskID string + Prompt string + WebhookSecret string + WebhookURL string + type MidjourneyOutpaintParams struct + AspectRatio string + ParentTaskID string + Prompt string + WebhookSecret string + WebhookURL string + ZoomRatio float64 + type MidjourneyPanParams struct + Direction string + ParentTaskID string + WebhookSecret string + WebhookURL string + type MidjourneyRerollParams struct + ParentTaskID string + Prompt string + WebhookSecret string + WebhookURL string + type MidjourneySeedParams struct + TaskID string + WebhookSecret string + WebhookURL string + type MidjourneyShortenParams struct + Prompt string + WebhookSecret string + WebhookURL string + type MidjourneyUpscale1xParams struct + Index string + ParentTaskID string + WebhookSecret string + WebhookURL string + type MidjourneyUpscaleAltParams struct + ParentTaskID string + Type string + WebhookSecret string + WebhookURL string + type MidjourneyUpscaleHighresParams struct + ImageURL string + Index string + ParentTaskID string + Type string + WebhookSecret string + WebhookURL string + type MidjourneyUpscaleParams struct + Index string + TaskID string + type MidjourneyVariationsParams struct + Index string + ParentTaskID string + WebhookSecret string + WebhookURL string + type MidjourneyVaryParams struct + Index string + Strength int + TaskID string + type MidjourneyZoomParams struct + TaskID string + Zoom int + type RateLimitError struct + Err *Error + func (e *RateLimitError) Error() string + type Runway struct + func NewRunway(httpClient *HTTPClient) *Runway + func (r *Runway) Generate(params RunwayGenerateParams) (*TaskResponse, error) + func (r *Runway) ImageToVideo(imageURL string, prompt string, model string, duration int) (*TaskResponse, error) + func (r *Runway) TextToVideo(prompt string, aspectRatio string, model string, duration int) (*TaskResponse, error) + func (r *Runway) VideoToVideo(videoURL string, prompt string, model string, duration int) (*TaskResponse, error) + type RunwayGenerateParams struct + AspectRatio string + Duration *int + EndImageURL string + Flip *bool + GenerationType string + ImageURL string + Model string + Prompt string + VideoURL string + WebhookSecret string + WebhookURL string + type Suno struct + func NewSuno(httpClient *HTTPClient) *Suno + func (s *Suno) Extend(params SunoExtendParams) (*TaskResponse, error) + func (s *Suno) Generate(params SunoGenerateParams) (*TaskResponse, error) + func (s *Suno) GenerateLyrics(params SunoLyricsParams) (*TaskResponse, error) + func (s *Suno) Upload(params SunoUploadParams) (*TaskResponse, error) + type SunoExtendParams struct + ContinueAt int + FromUpload *bool + Lyrics string + ParentTaskID string + Prompt string + SongID string + Tags string + Title string + WebhookSecret string + WebhookURL string + type SunoGenerateParams struct + Lyrics string + MakeInstrumental *bool + Model string + Prompt string + Tags string + Title string + WebhookSecret string + WebhookURL string + type SunoLyricsParams struct + Prompt string + type SunoUploadParams struct + AudioURL string + type TaskResponse struct + Actions []string + CreatedAt string + DownloadURL string + Error string + ID string + ImageURL string + ImageURLs []string + Message string + OriginalImageURL string + Percentage interface{} + Progress int + Result interface{} + Status TaskStatus + TaskID string + TaskType string + UpdatedAt string + VideoURL string + type TaskStatus string + const TaskStatusCompleted + const TaskStatusFailed + const TaskStatusPending + const TaskStatusProcessing + type Tasks struct + func NewTasks(httpClient *HTTPClient) *Tasks + func (t *Tasks) Get(taskID string) (*TaskResponse, error) + func (t *Tasks) GetAccountInfo() (*AccountInfo, error) + func (t *Tasks) GetMany(taskIDs []string) (*TasksResponse, error) + func (t *Tasks) WaitFor(taskID string, options *WaitForOptions) (*TaskResponse, error) + type TasksResponse struct + Tasks []TaskResponse + type TimeoutError struct + Err *Error + func (e *TimeoutError) Error() string + type Udio struct + func NewUdio(httpClient *HTTPClient) *Udio + func (u *Udio) Generate(params UdioGenerateParams) (*TaskResponse, error) + type UdioGenerateParams struct + BypassPromptOptimization *bool + ClarityStrength *float64 + GenerationQuality *float64 + Lyrics string + LyricsPlacementEnd *int + LyricsPlacementStart *int + LyricsStrength *float64 + Model string + NegativePrompt string + Prompt string + PromptStrength *float64 + Tags string + WebhookSecret string + WebhookURL string + type ValidationError struct + func NewValidationError(message string, details interface{}) *ValidationError + type WaitForOptions struct + Interval int + OnProgress func(progress int) + Timeout int