---
title: Producer tekst naar muziek | RunAPI
description: Gebruik het eindpunt voor tekst naar muziek om een asynchrone taak aan
  te maken.
url: https://runapi.ai/nl/docs/api/producer/text-to-music.md
canonical: https://runapi.ai/nl/docs/api/producer/text-to-music
locale: nl
---

> HTML-versie: https://runapi.ai/nl/docs/api/producer/text-to-music
> Site-index voor agents: https://runapi.ai/llms.txt

# Producer tekst naar muziek

## Overzicht

Gebruik het eindpunt voor tekst naar muziek met een ondersteund model. Gebruik de geretourneerde taak-ID om de status op te halen, of geef callback_url op voor de hieronder gedocumenteerde leveringen.

### Snelstart

1. Maak een API-sleutel aan en stel deze in als RUNAPI_API_KEY.
2. Kies een ondersteund model en stuur een POST-verzoek waarvan de body overeenkomt met het schema van dat model.
3. Sla de geretourneerde taak-ID op en poll vervolgens totdat een eindstatus is bereikt, of verwerk de hieronder gedocumenteerde callbacks.

## Eindpunt

POST /api/v1/producer/text_to_music

Basis-URL: https://runapi.ai

API-versie: v1

Authenticatie: Authorization: Bearer YOUR_API_TOKEN

## Ondersteunde modellen

Open een modelpagina voor actuele prijzen, snelheidslimieten en details over commercieel gebruik.

- [fuzz-0.8](https://runapi.ai/nl/models/producer/fuzz-0.8)
- [fuzz-1.0](https://runapi.ai/nl/models/producer/fuzz-1.0)
- [fuzz-1.0-pro](https://runapi.ai/nl/models/producer/fuzz-1.0-pro)
- [fuzz-1.1](https://runapi.ai/nl/models/producer/fuzz-1.1)
- [fuzz-1.1-pro](https://runapi.ai/nl/models/producer/fuzz-1.1-pro)
- [fuzz-2.0](https://runapi.ai/nl/models/producer/fuzz-2.0)
- [fuzz-2.0-pro](https://runapi.ai/nl/models/producer/fuzz-2.0-pro)
- [fuzz-2.0-raw](https://runapi.ai/nl/models/producer/fuzz-2.0-raw)

## Verzoekschema

Velden en toegestane waarden zijn afhankelijk van het geselecteerde model. Indien opgegeven, ontvangt callback_url de hieronder gedocumenteerde taakaflevering.

### fuzz-0.8

```json
{
  "callback_url": {
    "description": "Webhook-URL voor asynchrone meldingen.",
    "type": "string"
  },
  "lyrics": {
    "description": "Exacte songteksten om te zingen.",
    "type": "string"
  },
  "model": {
    "description": "Model-slug.",
    "required": true,
    "type": "string"
  },
  "prompt": {
    "description": "Muziekstijl en productiebriefing.",
    "length": true,
    "max": 200,
    "min": 1,
    "required": true,
    "type": "string"
  },
  "title": {
    "description": "Muziekitel.",
    "type": "string"
  },
  "vocal_mode": {
    "description": "Vocale generatiemodus.",
    "enum": [
      "exact_lyrics",
      "instrumental"
    ],
    "required": true,
    "type": "string"
  }
}
```

### fuzz-1.0

```json
{
  "callback_url": {
    "description": "Webhook-URL voor asynchrone meldingen.",
    "type": "string"
  },
  "lyrics": {
    "description": "Exacte songteksten om te zingen.",
    "type": "string"
  },
  "model": {
    "description": "Model-slug.",
    "required": true,
    "type": "string"
  },
  "prompt": {
    "description": "Muziekstijl en productiebriefing.",
    "length": true,
    "max": 200,
    "min": 1,
    "required": true,
    "type": "string"
  },
  "title": {
    "description": "Muziekitel.",
    "type": "string"
  },
  "vocal_mode": {
    "description": "Vocale generatiemodus.",
    "enum": [
      "exact_lyrics",
      "instrumental"
    ],
    "required": true,
    "type": "string"
  }
}
```

### fuzz-1.0-pro

```json
{
  "callback_url": {
    "description": "Webhook-URL voor asynchrone meldingen.",
    "type": "string"
  },
  "lyrics": {
    "description": "Exacte songteksten om te zingen.",
    "type": "string"
  },
  "model": {
    "description": "Model-slug.",
    "required": true,
    "type": "string"
  },
  "prompt": {
    "description": "Muziekstijl en productiebriefing.",
    "length": true,
    "max": 200,
    "min": 1,
    "required": true,
    "type": "string"
  },
  "title": {
    "description": "Muziekitel.",
    "type": "string"
  },
  "vocal_mode": {
    "description": "Vocale generatiemodus.",
    "enum": [
      "exact_lyrics",
      "instrumental"
    ],
    "required": true,
    "type": "string"
  }
}
```

### fuzz-1.1

```json
{
  "callback_url": {
    "description": "Webhook-URL voor asynchrone meldingen.",
    "type": "string"
  },
  "lyrics": {
    "description": "Exacte songteksten om te zingen.",
    "type": "string"
  },
  "model": {
    "description": "Model-slug.",
    "required": true,
    "type": "string"
  },
  "prompt": {
    "description": "Muziekstijl en productiebriefing.",
    "length": true,
    "max": 200,
    "min": 1,
    "required": true,
    "type": "string"
  },
  "title": {
    "description": "Muziekitel.",
    "type": "string"
  },
  "vocal_mode": {
    "description": "Vocale generatiemodus.",
    "enum": [
      "exact_lyrics",
      "instrumental"
    ],
    "required": true,
    "type": "string"
  }
}
```

### fuzz-1.1-pro

```json
{
  "callback_url": {
    "description": "Webhook-URL voor asynchrone meldingen.",
    "type": "string"
  },
  "lyrics": {
    "description": "Exacte songteksten om te zingen.",
    "type": "string"
  },
  "model": {
    "description": "Model-slug.",
    "required": true,
    "type": "string"
  },
  "prompt": {
    "description": "Muziekstijl en productiebriefing.",
    "length": true,
    "max": 200,
    "min": 1,
    "required": true,
    "type": "string"
  },
  "title": {
    "description": "Muziekitel.",
    "type": "string"
  },
  "vocal_mode": {
    "description": "Vocale generatiemodus.",
    "enum": [
      "exact_lyrics",
      "instrumental"
    ],
    "required": true,
    "type": "string"
  }
}
```

### fuzz-2.0

```json
{
  "callback_url": {
    "description": "Webhook-URL voor asynchrone meldingen.",
    "type": "string"
  },
  "lyrics": {
    "description": "Exacte songteksten om te zingen.",
    "type": "string"
  },
  "model": {
    "description": "Model-slug.",
    "required": true,
    "type": "string"
  },
  "prompt": {
    "description": "Muziekstijl en productiebriefing.",
    "length": true,
    "max": 200,
    "min": 1,
    "required": true,
    "type": "string"
  },
  "title": {
    "description": "Muziekitel.",
    "type": "string"
  },
  "vocal_mode": {
    "description": "Vocale generatiemodus.",
    "enum": [
      "exact_lyrics",
      "instrumental"
    ],
    "required": true,
    "type": "string"
  }
}
```

### fuzz-2.0-pro

```json
{
  "callback_url": {
    "description": "Webhook-URL voor asynchrone meldingen.",
    "type": "string"
  },
  "lyrics": {
    "description": "Exacte songteksten om te zingen.",
    "type": "string"
  },
  "model": {
    "description": "Model-slug.",
    "required": true,
    "type": "string"
  },
  "prompt": {
    "description": "Muziekstijl en productiebriefing.",
    "length": true,
    "max": 200,
    "min": 1,
    "required": true,
    "type": "string"
  },
  "title": {
    "description": "Muziekitel.",
    "type": "string"
  },
  "vocal_mode": {
    "description": "Vocale generatiemodus.",
    "enum": [
      "exact_lyrics",
      "instrumental"
    ],
    "required": true,
    "type": "string"
  }
}
```

### fuzz-2.0-raw

```json
{
  "callback_url": {
    "description": "Webhook-URL voor asynchrone meldingen.",
    "type": "string"
  },
  "lyrics": {
    "description": "Exacte songteksten om te zingen.",
    "type": "string"
  },
  "model": {
    "description": "Model-slug.",
    "required": true,
    "type": "string"
  },
  "prompt": {
    "description": "Muziekstijl en productiebriefing.",
    "length": true,
    "max": 200,
    "min": 1,
    "required": true,
    "type": "string"
  },
  "title": {
    "description": "Muziekitel.",
    "type": "string"
  },
  "vocal_mode": {
    "description": "Vocale generatiemodus.",
    "enum": [
      "exact_lyrics",
      "instrumental"
    ],
    "required": true,
    "type": "string"
  }
}
```

#### Voorwaardelijke regels

Deze vereisten zijn van toepassing wanneer alle vermelde voorwaarden overeenkomen.

- **Wanneer**: `vocal_mode` = `exact_lyrics`; **Vereist**: `lyrics`
- **Wanneer**: `vocal_mode` = `instrumental`; **Niet geaccepteerd**: `lyrics`

## Acceptatie aanmaken

HTTP 202 - POST /api/v1/producer/text_to_music

### Responsschema

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "processing"
      ],
      "type": "string"
    },
    "task_replayed": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "status",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "id": "tsk_reference_demo",
  "status": "processing"
}
```

## Pollen bezig

HTTP 200 - GET /api/v1/producer/text_to_music/:id

### Responsschema

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "processing"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "id": "tsk_reference_demo",
  "status": "processing"
}
```

## Pollen voltooid

HTTP 200 - GET /api/v1/producer/text_to_music/:id

### Responsschema

```json
{
  "properties": {
    "audios": {
      "items": {
        "properties": {
          "audio_url": {
            "type": "string",
            "x-runapi-generated-media": true
          },
          "duration_seconds": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "image_url": {
            "type": "string",
            "x-runapi-generated-media": true
          },
          "lyrics": {
            "type": "string"
          },
          "model_name": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "audio_url",
          "model_name"
        ],
        "type": "object",
        "unevaluatedProperties": false
      },
      "type": "array"
    },
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "generation_stage": {
      "enum": [
        "all_audios_ready"
      ],
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "completed"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "generation_stage",
    "audios",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "audios": [
    {
      "audio_url": "https://file.runapi.ai/reference-audio.mp3",
      "duration_seconds": 78.36,
      "id": "audio_reference",
      "image_url": "https://cdn.runapi.ai/public/samples/image.jpg",
      "lyrics": "[Instrumental]",
      "model_name": "fuzz-2.0",
      "title": "Soft Piano"
    }
  ],
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "generation_stage": "all_audios_ready",
  "id": "tsk_reference_demo",
  "status": "completed"
}
```

## Pollen mislukt

HTTP 200 - GET /api/v1/producer/text_to_music/:id

### Responsschema

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "error": {
      "type": "string"
    },
    "generation_stage": {
      "enum": [
        "failed"
      ],
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "failed"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "error",
    "generation_stage",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "error": "Task processing failed.",
  "generation_stage": "failed",
  "id": "tsk_reference_demo",
  "status": "failed"
}
```

## Callback van klant: voltooid

HTTP 200 - POST callback_url

### Responsschema

```json
{
  "properties": {
    "audios": {
      "items": {
        "properties": {
          "audio_url": {
            "type": "string",
            "x-runapi-generated-media": true
          },
          "duration_seconds": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "image_url": {
            "type": "string",
            "x-runapi-generated-media": true
          },
          "lyrics": {
            "type": "string"
          },
          "model_name": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "audio_url",
          "model_name"
        ],
        "type": "object",
        "unevaluatedProperties": false
      },
      "type": "array"
    },
    "generation_stage": {
      "enum": [
        "all_audios_ready"
      ],
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "completed"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "generation_stage",
    "audios"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "audios": [
    {
      "audio_url": "https://file.runapi.ai/reference-audio.mp3",
      "duration_seconds": 78.36,
      "id": "audio_reference",
      "image_url": "https://cdn.runapi.ai/public/samples/image.jpg",
      "lyrics": "[Instrumental]",
      "model_name": "fuzz-2.0",
      "title": "Soft Piano"
    }
  ],
  "generation_stage": "all_audios_ready",
  "id": "tsk_reference_demo",
  "status": "completed"
}
```

## Callback van klant: mislukt

HTTP 200 - POST callback_url

### Responsschema

```json
{
  "properties": {
    "error": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "properties": {
            "code": {
              "type": "string"
            },
            "limit_cents": {
              "type": "integer"
            },
            "message": {
              "type": "string"
            },
            "reset_at": {
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "used_cents": {
              "type": "integer"
            },
            "window": {
              "enum": [
                "1h",
                "1d",
                "7d",
                "daily",
                "weekly",
                "monthly",
                "lifetime"
              ],
              "type": "string"
            }
          },
          "required": [
            "code",
            "message"
          ],
          "type": "object",
          "unevaluatedProperties": false
        }
      ]
    },
    "generation_stage": {
      "enum": [
        "failed"
      ],
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "failed"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "error",
    "generation_stage"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": {
    "code": "generation_failed",
    "message": "Task processing failed."
  },
  "generation_stage": "failed",
  "id": "tsk_reference_demo",
  "status": "failed"
}
```

## Fouten

HTTP 401 - POST /api/v1/producer/text_to_music

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "Authentication required"
}
```

## Fouten

HTTP 401 - GET /api/v1/producer/text_to_music/:id

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "Authentication required"
}
```

## Fouten

HTTP 400 - POST /api/v1/producer/text_to_music

### Responsschema

```json
{
  "oneOf": [
    {
      "properties": {
        "error": {
          "description": "Leesbare foutmelding.",
          "type": "string"
        }
      },
      "required": [
        "error"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    {
      "properties": {
        "error": {
          "description": "Leesbare validatiesamenvatting.",
          "type": "string"
        },
        "errors": {
          "additionalProperties": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": "Validatieberichten gekoppeld aan het openbare aanvraagveld, met een reeks leesbare tekenreeksen per veld.",
          "type": "object"
        }
      },
      "required": [
        "error",
        "errors"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  ]
}
```

### Responsvoorbeeld

```json
{
  "error": "model must be one of: fuzz-0.8, fuzz-1.0, fuzz-1.0-pro, fuzz-1.1, fuzz-1.1-pro, fuzz-2.0, fuzz-2.0-pro, fuzz-2.0-raw"
}
```

## Fouten

HTTP 402 - POST /api/v1/producer/text_to_music

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "Insufficient balance"
}
```

## Fouten

HTTP 429 - POST /api/v1/producer/text_to_music

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "API key credit limit exceeded"
}
```

## Fouten

HTTP 409 - POST /api/v1/producer/text_to_music

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "The request uses features that are not supported for the selected model"
}
```

## Fouten

HTTP 429 - POST /api/v1/producer/text_to_music

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "Rate limit reached. Please retry later."
}
```

## Fouten

HTTP 503 - POST /api/v1/producer/text_to_music

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "Service under maintenance, please try again later"
}
```

## Fouten

HTTP 504 - POST /api/v1/producer/text_to_music

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "The request timed out"
}
```

## Fouten

HTTP 404 - GET /api/v1/producer/text_to_music/:id

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "Task with id 'tsk_reference_demo' not found"
}
```

## Gegenereerde codevoorbeelden

Gebruik cURL rechtstreeks, of installeer een SDK voor uw taal. Elk voorbeeld dient het gevalideerde verzoek in dat in deze referentie wordt getoond.

### curl

```curl
curl -X POST https://runapi.ai/api/v1/producer/text_to_music \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"model":"fuzz-2.0","vocal_mode":"instrumental","prompt":"Soft piano with gentle percussion."}'
```

### javascript

#### Installeren

```bash
npm install @runapi.ai/producer
```

```javascript
import { ProducerClient } from "@runapi.ai/producer";

const client = new ProducerClient({ apiKey: process.env.RUNAPI_API_KEY });
const task = await client.textToMusic.create({
  "model": "fuzz-2.0",
  "vocal_mode": "instrumental",
  "prompt": "Soft piano with gentle percussion."
});
```

### python

#### Installeren

```bash
pip install runapi-producer
```

```python
import os
from runapi.producer import ProducerClient

client = ProducerClient(api_key=os.environ["RUNAPI_API_KEY"])
task = client.text_to_music.create(
  model="fuzz-2.0",
  vocal_mode="instrumental",
  prompt="Soft piano with gentle percussion."
)
```

### go

#### Installeren

```bash
go get github.com/runapi-ai/producer-sdk/go@latest
```

```go
package main

import (
  "context"
  "log"
  "os"

  "github.com/runapi-ai/core-sdk/go/option"
  producer "github.com/runapi-ai/producer-sdk/go/producer"
)

func main() {
  client, err := producer.NewClient(option.WithAPIKey(os.Getenv("RUNAPI_API_KEY")))
  if err != nil {
    log.Fatal(err)
  }

  task, err := client.TextToMusic.Create(context.Background(), producer.TextToMusicParams{
    Model: producer.ProducerModel("fuzz-2.0"),
    VocalMode: producer.VocalMode("instrumental"),
    Prompt: "Soft piano with gentle percussion.",
  })
  if err != nil {
    log.Fatal(err)
  }
  _ = task
}
```

### ruby

#### Installeren

```bash
gem install runapi-producer
```

```ruby
require "runapi/producer"

client = RunApi::Producer::Client.new(api_key: ENV.fetch("RUNAPI_API_KEY"))
task = client.text_to_music.create(
  model: "fuzz-2.0",
  vocal_mode: "instrumental",
  prompt: "Soft piano with gentle percussion."
)
```

### java

#### Installeren

```kotlin
implementation("ai.runapi:runapi-producer")
```

```java
import ai.runapi.producer.ProducerClient;
import ai.runapi.producer.types.TextToMusicParams;
import ai.runapi.core.polling.TaskCreateResponse;

public final class Example {
  public static void main(String[] args) {
    ProducerClient client = ProducerClient.builder()
        .apiKey(System.getenv("RUNAPI_API_KEY"))
        .build();
    TaskCreateResponse task = client.textToMusic().create(
        TextToMusicParams.builder()
        .model("fuzz-2.0")
        .vocalMode("instrumental")
        .prompt("Soft piano with gentle percussion.")
            .build()
    );
  }
}
```

### php

#### Installeren

```bash
composer require runapi-ai/producer
```

```php
<?php

require __DIR__ . '/vendor/autoload.php';

use RunApi\Core\ClientOptions;
use RunApi\Producer\ProducerClient;

$client = new ProducerClient(new ClientOptions(apiKey: getenv('RUNAPI_API_KEY')));
$task = $client->textToMusic->create([
  "model" => "fuzz-2.0",
  "vocal_mode" => "instrumental",
  "prompt" => "Soft piano with gentle percussion."
]);
```

## Gerelateerde handleidingen

- [Authenticatie](https://runapi.ai/nl/docs/guides/authentication.md)
- [Snelstart](https://runapi.ai/nl/docs/guides/task-api/quickstart.md)

---

## Meer van RunAPI

- [Home](https://runapi.ai/nl/.md)
- [Modelcatalogus](https://runapi.ai/nl/models.md)
- [Prijzen](https://runapi.ai/nl/pricing.md)
- [Providers](https://runapi.ai/nl/models)
- [Documentatie](https://runapi.ai/nl/docs/guides)
- [SDK's](https://runapi.ai/nl/sdk.md)
- [CLI](https://runapi.ai/nl/cli.md)
- [MCP Server](https://runapi.ai/nl/mcp.md)
- [Claude Code vs Cursor](https://runapi.ai/nl/claude-code-vs-cursor.md)
- [Cursor API instellen](https://runapi.ai/nl/cursor-api-setup.md)
- [RunAPI vs OpenRouter](https://runapi.ai/nl/openrouter-alternative.md)
- [Enterprise](https://runapi.ai/nl/contact.md)
- [Contact](https://runapi.ai/nl/contact.md)
- [Voorwaarden](https://runapi.ai/nl/terms.md)
- [Privacy](https://runapi.ai/nl/privacy.md)
- [Site-index voor agents](https://runapi.ai/llms.txt)

Contact: contact@runapi.ai

## Gestructureerde gegevens

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "nl",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/nl",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/nl/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "nl",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/nl",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/nlicon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "nl",
    "@type": "TechArticle",
    "headline": "Producer tekst naar muziek",
    "description": "Gebruik het eindpunt voor tekst naar muziek om een asynchrone taak aan te maken.",
    "url": "https://runapi.ai/nl/docs/api/producer/text-to-music",
    "mainEntityOfPage": "https://runapi.ai/nl/docs/api/producer/text-to-music"
  }
]
```
