No matter what, i get “you must provide a model parameter”. Here is my PHP code:
$ch = curl_init();
$headers = [
'Authorization: Bearer ' . $model['api_key']
];
$post_data = [
'file' => new CURLFile($audio['tmp_name']),
'model' => 'whisper-1'
];
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_URL, $model['endpoint']);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$response = curl_exec($ch);
$response is always:
“error”: {
“message”: “you must provide a model parameter”,
“type”: “invalid_request_error”,
“param”: null,
“code”: null
}
I tried everything, including following the manual to the tee… This is crazy! Any ideas?