Completions API Documentation Seems Incomplete

I am having trouble finding a complete reference to:

I’ve found:

etc., but none has a complete description of the interface.

for example, I can do this:

def gpt_api_send_command(prompt, model=‘gpt-3.5-turbo’, max_lines=100):
client = OpenAI()
function_schema = {
“name”: “send_command”,
“description”: “Execute a command and return the output”,
“parameters”: {
“type”: “object”,
“properties”: {
“commandString”: {
“type”: “string”,
“description”: “The command to execute”
“required”: [“commandString”]

messages = [
    {"role": "user", "content": prompt},

print("About to make API call")
response =
    function_call={"name": "send_command", "arguments": json.dumps({"commandString": "some command"})}
print("API call complete")

but I don’t see that anywhere in the docs. (I do see examples using tools as the input and functions within the tools ‘schema’, but I only found those in the cookbook, and nothing that implied only including functions, nor what the detailed options/implications happen to be, etc.)

It would be very helpful to have a complete reference for the completion interface. Does anyone know where to find something like that? If not, maybe a friendly developer at OpenAI or perhaps even some magnanimous member of the community might be so kind as to create something like that for us?


1 Like

I believe that’s the library, the docs on the endpoint are here… (Guide docs)

For functions and what-not, take a peek here… (API Reference)

The API-Reference side usually goes into more of the nitty gritty.

The OpenAI Cookbook and Quickstart guide are two other helpful links.

1 Like

Awesome! This is exactly what I was looking for:

Not sure why I couldn’t find it before. Maybe I assumed endpoints were related to direct server interaction not api library interaction.

In hopes of helping the next person with a similar question, here is a clip of the type of information provided in the link:

It also includes details on functions, tools, and all the other interface components I wanted to better understand.

1 Like

And for the next person - just look at the links in the sidebar of this forum…

1 Like