Integrate OpenAI with Portkey to get production metrics for your requests and make chat completions, audio, image generation, structured outputs, function calling, fine-tuning, batch, and more requests.
openai
Obtain your OpenAI API Key
Create a Virtual Key in Portkey
Initialize the Portkey Client
Supported OpenAI Models
Transcription
and Translation
methods for STT models:
Endpoint | Supported Parameters |
---|---|
complete | model, prompt, max_tokens, temperature, top_p, n, stream, logprobs, echo, stop, presence_penalty, frequency_penalty, best_of, logit_bias, user, seed, suffix |
embed | model, input, encoding_format, dimensions, user |
chatComplete | model, messages, functions, function_call, max_tokens, temperature, top_p, n, stream, stop, presence_penalty, frequency_penalty, logit_bias, user, seed, tools, tool_choice, response_format, logprobs, top_logprobs, stream_options, service_tier, parallel_tool_calls, max_completion_tokens |
imageGenerate | prompt, model, n, quality, response_format, size, style, user |
createSpeech | model, input, voice, response_format, speed |
createTranscription | All parameters supported |
createTranslation | All parameters supported |
user
parameter, Portkey allows you to send arbitrary custom metadata with your requests. This powerful feature enables you to associate additional context or information with each request, which can be useful for analysis, debugging, or other custom use cases.