NAME

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

OPERATIONS

DELETE /threads/{thread_id}

deleteThread

$client->delete_thread({
    body => { ... },
});

Delete a thread.

Path/query parameters

  • thread_id (in path, required, string) - The ID of the thread to delete.

Responses

200 - OK

Content-Type: application/json

Example:

{
   "deleted" : false,
   "id" : "string",
   "object" : "thread.deleted"
}

GET /threads/{thread_id}

getThread

$client->get_thread({
    body => { ... },
});

Retrieves a thread.

Path/query parameters

  • thread_id (in path, required, string) - The ID of the thread to retrieve.

Responses

200 - OK

Content-Type: application/json

Example:

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

POST /threads/{thread_id}

modifyThread

$client->modify_thread({
    body => { ... },
});

Modifies a thread.

Path/query parameters

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

Responses

200 - OK

Content-Type: application/json

Example:

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

SCHEMAS

DeleteThreadResponse

Properties:

  • deleted (boolean, required)

  • id (string, required)

  • object (string, required)

    Allowed values: thread.deleted

Metadata

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.

Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

ModifyThreadRequest

Properties:

  • metadata (Metadata)

    See "Metadata" below for shape.

  • tool_resources (anyOf)

ThreadObject

Properties:

  • created_at (integer, required) - The Unix timestamp (in seconds) for when the thread was created.

  • id (string, required) - The identifier, which can be referenced in API endpoints.

  • metadata (Metadata, required)

    See "Metadata" below for shape.

  • object (string, required) - The object type, which is always thread .

    Allowed values: thread

  • tool_resources (anyOf, required)

SEE ALSO

OpenAPI::Client::OpenAI::Path

COPYRIGHT AND LICENSE

Copyright (C) 2023-2026 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.