API Response value documentation

Hi there! I’m working on a Swift library to represent the OpenAI API (here, if you’re interested). The documentation is generally quite good, but one piece that’s missing is documentation on what will get returned from calls. For example, I’ve just been implementing the “Audio Transcription” calls, and while it has examples for verbose_json, it doesn’t specify which fields are optional, or have a default value, and it seems that avg_logprob is one field which may sometimes be missing.

In other cases, there is no documentation on what an “enumeration” field might contain. For example, with text completions, I’ve inferred that the finish_reason field could be “length” or “stop” from other parts of the documentation, but have no idea if there are other valid finish reasons that I’m not aware of.

Is there any documentation around for what valid response outputs can be, in a more complete fashion?

3 Likes