# Completions API Documentation Seems Incomplete

**URL:** <https://community.openai.com/t/completions-api-documentation-seems-incomplete/681666>\
**Category:** Documentation\
**Tags:** api\
**Created:** [March 13, 2024, 6:28pm UTC](https://community.openai.com/t/completions-api-documentation-seems-incomplete/681666 "2024-03-13T18:28:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![markanthonykoop](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/markanthonykoop/32/47422_2.png) [@markanthonykoop](https://community.openai.com/u/markanthonykoop)\
**Post date:** [March 13, 2024, 6:28pm UTC](https://community.openai.com/t/completions-api-documentation-seems-incomplete/681666/1 "2024-03-13T18:28:26Z")

</div>

I am having trouble finding a complete reference to:

> client.chat.completions.create

I’ve found:

https://platform.openai.com/docs/guides/text-generation  
https://platform.openai.com/docs/quickstart?context=python  
https://cookbook.openai.com/examples/how\_to\_call\_functions\_with\_chat\_models  
https://platform.openai.com/docs/api-reference

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 = client.chat.completions.create(
> model=model,
> messages=messages,
> functions=[function_schema],
> 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?

Thanks!

---

<div class="post-metadata">

**Author:** ![PaulBellow](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/paulbellow/32/597962_2.png) [@PaulBellow](https://community.openai.com/u/PaulBellow)\
**Post date:** [March 13, 2024, 6:36pm UTC](https://community.openai.com/t/completions-api-documentation-seems-incomplete/681666/2 "2024-03-13T18:36:32Z")

</div>

I believe that’s the library, the docs on the endpoint are [here](https://platform.openai.com/docs/guides/text-generation/chat-completions-api)… (Guide docs)

For functions and what-not, take a peek [here](https://platform.openai.com/docs/api-reference/chat/create)… (API Reference)

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

The [OpenAI Cookbook](https://cookbook.openai.com/) and [Quickstart guide](https://platform.openai.com/docs/quickstart) are two other helpful links.

 ![image](https://us1.discourse-cdn.com/openai1/original/4X/8/4/7/8474b03cbab47050c0fe21dc74f65ebc39b0da14.png)

---

<div class="post-metadata">

**Author:** ![markanthonykoop](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/markanthonykoop/32/47422_2.png) [@markanthonykoop](https://community.openai.com/u/markanthonykoop)\
**Post date:** [March 13, 2024, 7:39pm UTC](https://community.openai.com/t/completions-api-documentation-seems-incomplete/681666/3 "2024-03-13T19:39:38Z")

</div>

Awesome! This is exactly what I was looking for:

https://platform.openai.com/docs/api-reference/chat/create

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:

 ![image](https://us1.discourse-cdn.com/openai1/original/4X/c/8/d/c8d0f07fd515a11dde3cff3b38253989a1af1819.png)

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

---

<div class="post-metadata">

**Author:** ![\_j](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/_j/32/766292_2.png) [@\_j](https://community.openai.com/u/_j)\
**Post date:** [March 13, 2024, 7:43pm UTC](https://community.openai.com/t/completions-api-documentation-seems-incomplete/681666/4 "2024-03-13T19:43:27Z")

</div>

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