NAME

OpenAPI::Client::OpenAI::Path::threads-thread_id - Documentation for the /threads/{thread_id} path.

DESCRIPTION

This document describes the API endpoint at /threads/{thread_id}.

PATHS

DELETE /threads/{thread_id}

Delete a thread.

Operation ID

deleteThread

$client->deleteThread( ... );

Parameters

  • thread_id (in path) (Required) - The ID of the thread to delete.

    Type: string

Responses

Status Code: 200

OK

Content Types:

GET /threads/{thread_id}

Retrieves a thread.

Operation ID

getThread

$client->getThread( ... );

Parameters

  • thread_id (in path) (Required) - The ID of the thread to retrieve.

    Type: string

Responses

Status Code: 200

OK

Content Types:

  • application/json

    Example (See the OpenAI spec for more detail):

    {
      "id": "thread_abc123",
      "object": "thread",
      "created_at": 1698107661,
      "metadata": {}
    }

POST /threads/{thread_id}

Modifies a thread.

Operation ID

modifyThread

$client->modifyThread( ... );

Parameters

  • thread_id (in path) (Required) - The ID of the thread to modify. Only the `metadata` can be modified.

    Type: string

Request Body

Content Type: application/json

Example:

{
   "tool_resources" : {
      "code_interpreter" : {
         "file_ids" : [
            null
         ]
      },
      "file_search" : {
         "vector_store_ids" : [
            null
         ]
      }
   }
}


         

Responses

Status Code: 200

OK

Content Types:

  • application/json

    Example (See the OpenAI spec for more detail):

    {
      "id": "thread_abc123",
      "object": "thread",
      "created_at": 1698107661,
      "metadata": {}
    }

SEE ALSO

OpenAPI::Client::OpenAI::Path

COPYRIGHT AND LICENSE

Copyright (C) 2023-2025 by Nelson Ferraz

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available.