HiggsfieldMCP / tools /generate_audio_batch.md
StarpowerTechnology's picture
Upload 333 files
7f635f8 verified
|
Raw History Blame Contribute Delete
5.97 kB
Submit 1-6 independent audio generations in parallel without opening a widget. Requests can send text and reference inputs to external audio model providers through Higgsfield and consume credits. Each requests[] item accepts generation params with count fixed to 1 and no get_cost, creates one job on successful submission, and keeps its caller-provided index in the response. Use for multiple distinct prompts or inputs; use generate_audio for one user-facing generation. Poll returned job IDs with jobs_wait in agent-chosen groups of at most 8. For larger sets, collect indexed jobs across submission batches. After every job in the user's set is terminal, pass the collected jobs to exactly one show_generation_by_ids call for up to 24 jobs; never use show_generations or call job_display once per job. A partial failure or timeout does not make the whole batch safe to retry: keep returned job IDs and resolve unknown submission outcomes before retrying affected items.
```ts
mcp__Higgsfield__generate_audio_batch(args: {
// Ordered audio generation requests. Response jobs keep the provided indices.
// minItems: 1, maxItems: 6
requests: Array<
{
// Caller-provided stable index, such as the scene number.
index: integer, // minimum: 0, maximum: 9007199254740991
params: {
// Destination folder for this conversation. Use default_folder_id from create_project, or folder_id from create_folder when requested. Reuse on every generation and batch item in this conversation; never invent an ID or share a destination across chats. Omit by default for generation without a project. Before the first generation without a destination, call get_preferences: create a project only when auto_create_project is true or explicitly requested. Explicit existing destinations and requests to work without a project take priority; never change the saved preference for a one-off request.
folder_id?: string, // pattern: /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, format: "uuid"
// Request free generation only when the user explicitly asks. For a Katana run, also pass preset_session_id from start_katana_preset_session; the backend validates eligibility. Do not combine with use_unlim or retry a rejected free request on credits without explicit approval. true caps count to 1.
use_free_gens?: boolean,
// Session returned by start_katana_preset_session for every Katana preset run, paid or free. Forward this ID on every generation and batch item in that run, including cost estimates. Add use_free_gens: true only when the user explicitly requests free generations; otherwise omit it.
preset_session_id?: string, // minLength: 1, maxLength: 64, pattern: /^[A-Za-z0-9_-]+$/
// Audio model ID (required). Default 'seed_audio'; use models_search/models_get to inspect others.
model: string,
// Text to speak, simple-mode Suno music description, or display label when explicit Suno content is supplied.
prompt: string, // minLength: 1
// Each successfully submitted batch item creates one job; rejected items or choices create none. Add another requests[] item for another generation.
count?: 1, // default: 1
// Whether voice_id is a built-in preset voice ('preset') or one of the user's own voices ('element'). Take it from list_voices.
voice_type?: "preset" | "element",
// Voice id from list_voices. Pass together with voice_type; never invent one.
voice_id?: string,
// Reference media inputs.
medias?: Array<
{
// Uploaded media UUID from media_upload_and_confirm, completed generation job UUID, or authorized HTTPS image URL. HTTPS image URLs are imported and confirmed automatically.
value: string,
// Canonical reference role. Allowed: 'image' — Generic reference image (style, composition, subject). | 'start_image' — First frame of the output video. | 'end_image' — Last frame of the output video. | 'video' — Reference video clip. | 'audio' — Reference audio clip. | 'ref_element' — Named element to preserve across frames (product, character). The selected model may support only a subset; use models_get to inspect it. The server maps canonical roles to model-specific backend media keys when needed.
role: "image" | "start_image" | "end_image" | "video" | "audio" | "ref_element",
}
>,
// Cost preflight is not supported inside a batch submission.
get_cost?: Exclude<any, any>,
// Which balance pays for this generation: the caller's free-trial unlimited generations (true) or their credits (false). OMIT IT to let the server decide — if they hold an allowance that covers the model, the tool submits nothing and returns `unlim_choice` for the user to answer; call again with the same params plus this field. true also caps count to 1.
use_unlim?: boolean,
[key: string]: any,
},
}
>,
// Briefly describe the user's underlying goal and why this call helps, in one short sentence. Do not include names, contact details, credentials, URLs, or biometric details. Analytics only; not a generation prompt.
context?: string, // maxLength: 500
}): Promise<{
jobs: Array<
{
index: integer, // minimum: 0, maximum: 9007199254740991
job_id?: string, // pattern: /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, format: "uuid"
status: ("pending" | "waiting" | "queued" | "dna" | "script" | "visuals" | "vision" | "flow" | "in_progress" | "ip_detect" | "completed" | "canceled" | "failed" | "nsfw" | "ip_detected") | "submission_failed",
error?: string,
warning?: string,
// Additional JSON Schema constraints: propertyNames={"type": "string"}
adjustments?: { [key: string]: { requested: string | number | boolean, used: string | number | boolean, reason: string } },
}
>,
submitted_count: integer, // minimum: 0, maximum: 9007199254740991
failed_count: integer, // minimum: 0, maximum: 9007199254740991
}>;
```