Skip to content

Commit c18dbd2

Browse files
fix video resp. audio models
1 parent bbdd7fd commit c18dbd2

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

internal/provider/openai/cost.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,15 @@ var OpenAiPerThousandTokenCost = map[string]map[string]float64{
149149
},
150150
"audio": {
151151
"whisper-1": 0.006,
152-
"tts-1": 0.015,
153-
"tts-1-hd": 0.03,
152+
153+
"tts-1": 0.015,
154+
"tts-1-hd": 0.03,
155+
156+
"gpt-4o-transcribe": 0.006,
157+
"gpt-4o-transcribe-diarize": 0.006,
158+
"gpt-4o-mini-transcribe": 0.003,
159+
160+
"gpt-4o-mini-tts": 0.012,
154161
},
155162
"video": { // $ per sec
156163
"sora-2": 0.1,

internal/server/web/proxy/video.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func getVideoHandler(prod bool, client http.Client, e estimator) gin.HandlerFunc
115115
}
116116
}
117117
ginCtx.Set("costInUsd", cost)
118-
ginCtx.Data(res.StatusCode, "application/json", bytes)
118+
ginCtx.Data(res.StatusCode, res.Header.Get("Content-Type"), bytes)
119119
return
120120
}
121121
}

0 commit comments

Comments
 (0)