{ "/threads": { "post": { "tags": [ "assistants" ], "summary": "Create Threads", "description": "Create a thread.\n\nAPI Reference - https://platform.openai.com/docs/api-reference/threads/createThread", "operationId": "create_threads_threads_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/threads/{thread_id}": { "get": { "tags": [ "assistants" ], "summary": "Get Thread", "description": "Retrieves a thread.\n\nAPI Reference - https://platform.openai.com/docs/api-reference/threads/getThread", "operationId": "get_thread_threads__thread_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "thread_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Thread Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/threads/{thread_id}/messages": { "post": { "tags": [ "assistants" ], "summary": "Add Messages", "description": "Create a message.\n\nAPI Reference - https://platform.openai.com/docs/api-reference/messages/createMessage", "operationId": "add_messages_threads__thread_id__messages_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "thread_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Thread Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "assistants" ], "summary": "Get Messages", "description": "Returns a list of messages for a given thread.\n\nAPI Reference - https://platform.openai.com/docs/api-reference/messages/listMessages", "operationId": "get_messages_threads__thread_id__messages_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "thread_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Thread Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/threads/{thread_id}/runs": { "post": { "tags": [ "assistants" ], "summary": "Run Thread", "description": "Create a run.\n\nAPI Reference: https://platform.openai.com/docs/api-reference/runs/createRun", "operationId": "run_thread_threads__thread_id__runs_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "thread_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Thread Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } } }