Stability, BFL, Runway, Luma, Replicate, fal, Ideogram, Recraft, Leonardo, MiniMax, Kling, Higgsfield: call tables checked against vendor specs/SDKs, ImageGenerator/VideoGenerator seam with capped polling, /ai/media demo. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
92 lines
11 KiB
C++
92 lines
11 KiB
C++
#include "vendors/media/runway/calls.h"
|
|
|
|
namespace molo::media {
|
|
|
|
// CALLS-BEGIN (parsed by tools/check_spec.py; one row per line, strings in order:
|
|
// key, http method, path, spec operation id, body kind, body fields, query params, effect)
|
|
static const CallRow kRows[] = {
|
|
{"text_to_image", "POST", "/v1/text_to_image", "", "json", "model,promptText,ratio,referenceImages,contentModeration,seed,background,outputCount,quality,outputFormat,grounding,edit,maskUri,preciseEdit,thinkingLevel,backgroundColor,colors", "", "paid"},
|
|
{"text_to_video", "POST", "/v1/text_to_video", "", "json", "duration,model,promptText,ratio,contentModeration,outputFormat,proresProfile,seed,audio,negativePrompt,providerSettings,referenceAudio,references,referenceVideos,resolution,cfgScale,promptExpansionMode,draft,draftTaskId", "", "paid"},
|
|
{"image_to_video", "POST", "/v1/image_to_video", "", "json", "duration,model,promptImage,promptText,ratio,contentModeration,outputFormat,proresProfile,seed,audio,negativePrompt,providerSettings,references,referenceAudio,resolution,cfgScale,referenceVideos,promptExpansionMode,draft", "", "paid"},
|
|
{"video_to_video", "POST", "/v1/video_to_video", "", "json", "model,videoUri,contentModeration,keyframes,outputFormat,promptText,proresProfile,ratio,seed,targetAspectRatio,promptVideo,providerSettings,references,duration,referenceAudio,referenceVideos,resolution,audio,mode,draft", "", "paid"},
|
|
{"image_upscale", "POST", "/v1/image_upscale", "", "json", "imageUri,model,flavor,scaleFactor,sharpen,smartGrain,ultraDetail", "", "paid"},
|
|
{"video_upscale", "POST", "/v1/video_upscale", "", "json", "model,videoUri,creativity,flavor,fpsBoost,resolution,sharpen,smartGrain,targetFramerate", "", "paid"},
|
|
{"video_to_hdr", "POST", "/v1/video_to_hdr", "", "json", "model,videoUri,outputFormat,proresProfile", "", "paid"},
|
|
{"video_to_audio", "POST", "/v1/video_to_audio", "", "json", "duration,model,videoUri,format,negativePrompt,numVariants,preserveSpeech,promptText,seed", "", "paid"},
|
|
{"character_performance", "POST", "/v1/character_performance", "", "json", "type,uri,publicFigureThreshold,character,model,reference,bodyControl,contentModeration,expressionIntensity,ratio,seed", "", "paid"},
|
|
{"sound_effect", "POST", "/v1/sound_effect", "", "json", "model,promptText,loudnessRate,outputFormat,pitchRate,referenceAudios,sampleRate,speechRate,duration,format,negativePrompt,numVariants,seed,loop", "", "paid"},
|
|
{"speech_to_speech", "POST", "/v1/speech_to_speech", "", "json", "type,uri,presetId,media,model,voice,removeBackgroundNoise", "", "paid"},
|
|
{"text_to_speech", "POST", "/v1/text_to_speech", "", "json", "model,promptText,loudnessRate,outputFormat,pitchRate,sampleRate,speechRate,voice,languageCode,nextText,previousText,seed,similarityBoost,speed,stability,style,useSpeakerBoost,applyTextNormalization", "", "paid"},
|
|
{"voice_dubbing", "POST", "/v1/voice_dubbing", "", "json", "audioUri,model,targetLang,disableVoiceCloning,dropBackgroundAudio,numSpeakers", "", "paid"},
|
|
{"voice_isolation", "POST", "/v1/voice_isolation", "", "json", "audioUri,model", "", "paid"},
|
|
{"avatar_videos", "POST", "/v1/avatar_videos", "", "json", "presetId,type,avatarId,audio,text,voice,avatar,model,speech", "", "paid"},
|
|
{"generate.image", "POST", "/v1/generate/image", "", "json", "promptText,aspectRatio,contentModeration,outputCount,referenceImages,resolution,seed,configId,input", "", "paid"},
|
|
{"generate.video", "POST", "/v1/generate/video", "", "json", "aspectRatio,audio,contentModeration,duration,keyframes,negativePrompt,promptText,referenceAudio,referenceImages,referenceVideos,resolution,seed,configId,input", "", "paid"},
|
|
{"generate.audio", "POST", "/v1/generate/audio", "", "json", "promptText,type,duration,loop,referenceAudios,voice,configId,input", "", "paid"},
|
|
{"recipes.ad_localization", "POST", "/v1/recipes/ad_localization", "", "json", "uri,mode,prompt,version,audio,duration,firstFrame,ratio,shots,view,referenceImage,targetLanguage,outputCount,quality,productImages,productInfo,styleImages,userConcept,image,newProductImages,originalProductImage,referenceVideo,resolution,characterImage,productImage", "", "paid"},
|
|
{"recipes.marketing_stock_image", "POST", "/v1/recipes/marketing_stock_image", "", "json", "uri,mode,prompt,version,audio,duration,firstFrame,ratio,shots,view,referenceImage,targetLanguage,outputCount,quality,productImages,productInfo,styleImages,userConcept,image,newProductImages,originalProductImage,referenceVideo,resolution,characterImage,productImage", "", "paid"},
|
|
{"recipes.multi_shot_video", "POST", "/v1/recipes/multi_shot_video", "", "json", "uri,mode,prompt,version,audio,duration,firstFrame,ratio,shots,view,referenceImage,targetLanguage,outputCount,quality,productImages,productInfo,styleImages,userConcept,image,newProductImages,originalProductImage,referenceVideo,resolution,characterImage,productImage", "", "paid"},
|
|
{"recipes.product_ad", "POST", "/v1/recipes/product_ad", "", "json", "uri,mode,prompt,version,audio,duration,firstFrame,ratio,shots,view,referenceImage,targetLanguage,outputCount,quality,productImages,productInfo,styleImages,userConcept,image,newProductImages,originalProductImage,referenceVideo,resolution,characterImage,productImage", "", "paid"},
|
|
{"recipes.product_campaign_image", "POST", "/v1/recipes/product_campaign_image", "", "json", "uri,mode,prompt,version,audio,duration,firstFrame,ratio,shots,view,referenceImage,targetLanguage,outputCount,quality,productImages,productInfo,styleImages,userConcept,image,newProductImages,originalProductImage,referenceVideo,resolution,characterImage,productImage", "", "paid"},
|
|
{"recipes.product_swap", "POST", "/v1/recipes/product_swap", "", "json", "uri,mode,prompt,version,audio,duration,firstFrame,ratio,shots,view,referenceImage,targetLanguage,outputCount,quality,productImages,productInfo,styleImages,userConcept,image,newProductImages,originalProductImage,referenceVideo,resolution,characterImage,productImage", "", "paid"},
|
|
{"recipes.product_ugc", "POST", "/v1/recipes/product_ugc", "", "json", "uri,mode,prompt,version,audio,duration,firstFrame,ratio,shots,view,referenceImage,targetLanguage,outputCount,quality,productImages,productInfo,styleImages,userConcept,image,newProductImages,originalProductImage,referenceVideo,resolution,characterImage,productImage", "", "paid"},
|
|
{"tasks.get", "GET", "/v1/tasks/{id}", "", "none", "", "", "read"},
|
|
{"tasks.delete", "DELETE", "/v1/tasks/{id}", "", "none", "", "", "delete"},
|
|
{"organization.get", "GET", "/v1/organization", "", "none", "", "", "read"},
|
|
{"organization.usage", "POST", "/v1/organization/usage", "", "json", "beforeDate,startDate", "", "read"},
|
|
{"uploads.create", "POST", "/v1/uploads", "", "json", "file,fileMetadata", "", "write"},
|
|
{"avatars.create", "POST", "/v1/avatars", "", "json", "presetId,type,id,name,personality,referenceImage,voice,documentIds,imageProcessing,startScript,endDate,startDate", "", "write"},
|
|
{"avatars.list", "GET", "/v1/avatars", "", "none", "", "", "read"},
|
|
{"avatars.get", "GET", "/v1/avatars/{id}", "", "none", "", "", "read"},
|
|
{"avatars.update", "PATCH", "/v1/avatars/{id}", "", "json", "presetId,type,id,name,personality,referenceImage,voice,documentIds,imageProcessing,startScript,endDate,startDate", "", "write"},
|
|
{"avatars.delete", "DELETE", "/v1/avatars/{id}", "", "none", "", "", "delete"},
|
|
{"avatar_usage", "GET", "/v1/avatar_usage", "", "none", "", "", "read"},
|
|
{"avatar_conversations.list", "GET", "/v1/avatar_conversations", "", "none", "", "", "read"},
|
|
{"avatar_conversations.get", "GET", "/v1/avatar_conversations/{id}", "", "none", "", "", "read"},
|
|
{"avatar_conversations.delete", "DELETE", "/v1/avatar_conversations/{id}", "", "none", "", "", "delete"},
|
|
{"documents.create", "POST", "/v1/documents", "", "json", "content,name", "", "write"},
|
|
{"documents.list", "GET", "/v1/documents", "", "none", "", "", "read"},
|
|
{"documents.get", "GET", "/v1/documents/{id}", "", "none", "", "", "read"},
|
|
{"documents.update", "PATCH", "/v1/documents/{id}", "", "json", "content,name", "", "write"},
|
|
{"documents.delete", "DELETE", "/v1/documents/{id}", "", "none", "", "", "delete"},
|
|
{"voices.create", "POST", "/v1/voices", "", "json", "audio,type,model,prompt,from,name,description", "", "write"},
|
|
{"voices.preview", "POST", "/v1/voices/preview", "", "json", "audio,type,model,prompt,from,name,description", "", "paid"},
|
|
{"voices.list", "GET", "/v1/voices", "", "none", "", "", "read"},
|
|
{"voices.get", "GET", "/v1/voices/{id}", "", "none", "", "", "read"},
|
|
{"voices.update", "PATCH", "/v1/voices/{id}", "", "json", "audio,type,model,prompt,from,name,description", "", "write"},
|
|
{"voices.delete", "DELETE", "/v1/voices/{id}", "", "none", "", "", "delete"},
|
|
{"realtime_sessions.create", "POST", "/v1/realtime_sessions", "", "json", "presetId,type,avatarId,signedUrl,token,roomName,url,agentIdentity,description,name,parameters,timeoutSeconds,avatar,model,integration,livekit,maxDuration,personality,startScript,tools", "", "paid"},
|
|
{"realtime_sessions.get", "GET", "/v1/realtime_sessions/{id}", "", "none", "", "", "read"},
|
|
{"realtime_sessions.delete", "DELETE", "/v1/realtime_sessions/{id}", "", "none", "", "", "delete"},
|
|
{"routers.create", "POST", "/v1/routers", "", "json", "fallback,maxCreditsPerGeneration,models,optimizeFor,schemaVersion,slug,description,name,settings", "", "write"},
|
|
{"routers.list", "GET", "/v1/routers", "", "none", "", "", "read"},
|
|
{"routers.get", "GET", "/v1/routers/{id}", "", "none", "", "", "read"},
|
|
{"routers.update", "PATCH", "/v1/routers/{id}", "", "json", "fallback,maxCreditsPerGeneration,models,optimizeFor,schemaVersion,slug,description,name,settings", "", "write"},
|
|
{"routers.delete", "DELETE", "/v1/routers/{id}", "", "none", "", "", "delete"},
|
|
{"routers.requests", "GET", "/v1/routers/{id}/requests", "", "none", "", "", "read"},
|
|
{"workflows.list", "GET", "/v1/workflows", "", "none", "", "", "read"},
|
|
{"workflows.get", "GET", "/v1/workflows/{id}", "", "none", "", "", "read"},
|
|
{"workflows.invoke", "POST", "/v1/workflows/{id}", "", "json", "type,value,uri,nodeOutputs", "", "paid"},
|
|
{"workflow_invocations.get", "GET", "/v1/workflow_invocations/{id}", "", "none", "", "", "read"},
|
|
{"audit_logs.list", "GET", "/v1/organization/webapp/audit_logs", "", "none", "", "", "read"},
|
|
{"audit_logs.get", "GET", "/v1/organization/webapp/audit_logs/{id}", "", "none", "", "", "read"},
|
|
{"webapp_usage.list", "GET", "/v1/organization/webapp/usage", "", "none", "", "", "read"},
|
|
};
|
|
// CALLS-END
|
|
|
|
// FIELDS-BEGIN (parsed by tools/check_spec.py; one row per line: schema, fields we read)
|
|
static const char* const kFields[][2] = {
|
|
{"TaskRetrieveResponse", "id,status,createdAt,output,failure,failureCode,progress"},
|
|
};
|
|
// FIELDS-END
|
|
|
|
const CallTable& RunwayCalls::table() {
|
|
static const CallTable t("runway", kRows, sizeof(kRows) / sizeof(kRows[0]));
|
|
return t;
|
|
}
|
|
|
|
std::size_t RunwayCalls::field_count() { return sizeof(kFields) / sizeof(kFields[0]); }
|
|
const char* const* RunwayCalls::field_row(std::size_t i) { return kFields[i]; }
|
|
|
|
} // namespace molo::media
|