## Generate lip sync from URLs `client.Lipsync.Generate(ctx, body) (*LipsyncGenerate, error)` **post** `/v1/lipsync/generate` Starts a lip sync job from exactly one remote video URL and one remote audio URL. The response includes a request identifier to poll later. ### Parameters - `body LipsyncGenerateParams` - `Inputs param.Field[[]LipsyncGenerateParamsInput]` Exactly one video input and one audio input (order does not matter). - `Type string` Type of input media. - `const LipsyncGenerateParamsInputTypeVideo LipsyncGenerateParamsInputType = "video"` - `const LipsyncGenerateParamsInputTypeAudio LipsyncGenerateParamsInputType = "audio"` - `URL string` URL of the media resource. - `DisableActiveSpeakerDetection param.Field[bool]` Disable active speaker detection and use max-face lipsync preprocessing. - `ReferenceID param.Field[string]` Optional client-provided identifier for later retrieval. ### Returns - `type LipsyncGenerate struct{…}` - `RequestID string` Identifier of the created lip sync request. - `Status LipsyncGenerateStatus` Current state of the newly created request. - `const LipsyncGenerateStatusSuccess LipsyncGenerateStatus = "success"` ### Example ```go package main import ( "context" "fmt" "github.com/chamelaion/chamelaion-go" "github.com/chamelaion/chamelaion-go/option" ) func main() { client := chamelaion.NewClient( option.WithAPIKey("My API Key"), ) lipsyncGenerate, err := client.Lipsync.Generate(context.TODO(), chamelaion.LipsyncGenerateParams{ Inputs: []chamelaion.LipsyncGenerateParamsInput{chamelaion.LipsyncGenerateParamsInput{ Type: "video", URL: "https://cdn.example.com/episodes/42.mp4", }, chamelaion.LipsyncGenerateParamsInput{ Type: "audio", URL: "https://cdn.example.com/dubs/42-japanese.wav", }}, ReferenceID: chamelaion.String("dub-episode-42"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", lipsyncGenerate.RequestID) } ``` #### Response ```json { "status": "success", "request_id": "6f82a2d8-a6d4-4e8a-a0fa-e8b09823a2d8" } ```