> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# openai

> Chat completions, embeddings, and images

**Server path:** `/openai` | **Type:** Application | **PCID required:** Yes

## Tools

| Tool                                                            | Description                                            |
| --------------------------------------------------------------- | ------------------------------------------------------ |
| [`openai_create_response`](#openai_create_response)             | Create a model response using the OpenAI Responses API |
| [`openai_get_response`](#openai_get_response)                   | Get a model response by ID                             |
| [`openai_delete_response`](#openai_delete_response)             | Delete a model response                                |
| [`openai_cancel_response`](#openai_cancel_response)             | Cancel an in-progress response                         |
| [`openai_create_conversation`](#openai_create_conversation)     | Create a new conversation                              |
| [`openai_retrieve_conversation`](#openai_retrieve_conversation) | Retrieve a conversation by ID                          |
| [`openai_update_conversation`](#openai_update_conversation)     | Update a conversation                                  |
| [`openai_delete_conversation`](#openai_delete_conversation)     | Delete a conversation                                  |
| [`openai_list_items`](#openai_list_items)                       | List items in a conversation                           |
| [`openai_create_item`](#openai_create_item)                     | Create an item in a conversation                       |
| [`openai_retrieve_item`](#openai_retrieve_item)                 | Retrieve an item from a conversation                   |
| [`openai_delete_item`](#openai_delete_item)                     | Delete an item from a conversation                     |

***

## openai\_create\_response

Create a model response using the OpenAI Responses API

**Parameters:**

| Parameter        | Type      | Required | Default     | Description                                                                  |
| ---------------- | --------- | -------- | ----------- | ---------------------------------------------------------------------------- |
| `model`          | string    | No       | `"gpt-4.1"` | Model to use (e.g., gpt-5.4, gpt-5.2, gpt-5.1, gpt-5, gpt-4.1, gpt-4.1-mini) |
| `messages`       | object\[] | Yes      | —           | Array of conversation messages                                               |
| `temperature`    | number    | No       | `1`         | Sampling temperature (0-2)                                                   |
| `maxTokens`      | number    | No       | —           | Maximum tokens to generate                                                   |
| `topP`           | number    | No       | —           | Nucleus sampling parameter                                                   |
| `tools`          | object\[] | No       | —           | Tools available to the model                                                 |
| `toolChoice`     | string    | No       | —           | Tool choice configuration                                                    |
| `responseFormat` | object    | No       | —           | Response format specification                                                |
| `metadata`       | object    | No       | —           | Custom metadata for the response                                             |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "model": {
        "type": "string",
        "default": "gpt-4.1",
        "description": "Model to use (e.g., gpt-5.4, gpt-5.2, gpt-5.1, gpt-5, gpt-4.1, gpt-4.1-mini)"
      },
      "messages": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "role": {
              "type": "string",
              "enum": [
                "system",
                "user",
                "assistant",
                "tool"
              ],
              "description": "Message role"
            },
            "content": {
              "type": "string",
              "description": "Message content"
            }
          }
        },
        "description": "Array of conversation messages"
      },
      "temperature": {
        "type": "number",
        "default": 1,
        "description": "Sampling temperature (0-2)"
      },
      "maxTokens": {
        "type": "number",
        "description": "Maximum tokens to generate"
      },
      "topP": {
        "type": "number",
        "description": "Nucleus sampling parameter"
      },
      "tools": {
        "type": "array",
        "items": {
          "type": "object",
          "additionalProperties": true
        },
        "description": "Tools available to the model"
      },
      "toolChoice": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "object",
            "additionalProperties": true
          }
        ],
        "description": "Tool choice configuration"
      },
      "responseFormat": {
        "type": "object",
        "additionalProperties": true,
        "description": "Response format specification"
      },
      "metadata": {
        "type": "object",
        "additionalProperties": true,
        "description": "Custom metadata for the response"
      }
    },
    "required": [
      "PCID",
      "messages"
    ]
  }
  ```
</Expandable>

***

## openai\_get\_response

Get a model response by ID

**Parameters:**

| Parameter    | Type   | Required | Default | Description             |
| ------------ | ------ | -------- | ------- | ----------------------- |
| `responseId` | string | Yes      | —       | Response ID to retrieve |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "responseId": {
        "type": "string",
        "description": "Response ID to retrieve"
      }
    },
    "required": [
      "PCID",
      "responseId"
    ]
  }
  ```
</Expandable>

***

## openai\_delete\_response

Delete a model response

**Parameters:**

| Parameter    | Type   | Required | Default | Description           |
| ------------ | ------ | -------- | ------- | --------------------- |
| `responseId` | string | Yes      | —       | Response ID to delete |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "responseId": {
        "type": "string",
        "description": "Response ID to delete"
      }
    },
    "required": [
      "PCID",
      "responseId"
    ]
  }
  ```
</Expandable>

***

## openai\_cancel\_response

Cancel an in-progress response

**Parameters:**

| Parameter    | Type   | Required | Default | Description           |
| ------------ | ------ | -------- | ------- | --------------------- |
| `responseId` | string | Yes      | —       | Response ID to cancel |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "responseId": {
        "type": "string",
        "description": "Response ID to cancel"
      }
    },
    "required": [
      "PCID",
      "responseId"
    ]
  }
  ```
</Expandable>

***

## openai\_create\_conversation

Create a new conversation

**Parameters:**

| Parameter  | Type   | Required | Default | Description                          |
| ---------- | ------ | -------- | ------- | ------------------------------------ |
| `metadata` | object | No       | —       | Custom metadata for the conversation |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "metadata": {
        "type": "object",
        "additionalProperties": true,
        "description": "Custom metadata for the conversation"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## openai\_retrieve\_conversation

Retrieve a conversation by ID

**Parameters:**

| Parameter        | Type   | Required | Default | Description                 |
| ---------------- | ------ | -------- | ------- | --------------------------- |
| `conversationId` | string | Yes      | —       | Conversation ID to retrieve |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "conversationId": {
        "type": "string",
        "description": "Conversation ID to retrieve"
      }
    },
    "required": [
      "PCID",
      "conversationId"
    ]
  }
  ```
</Expandable>

***

## openai\_update\_conversation

Update a conversation

**Parameters:**

| Parameter        | Type   | Required | Default | Description                           |
| ---------------- | ------ | -------- | ------- | ------------------------------------- |
| `conversationId` | string | Yes      | —       | Conversation ID to update             |
| `metadata`       | object | No       | —       | Updated metadata for the conversation |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "conversationId": {
        "type": "string",
        "description": "Conversation ID to update"
      },
      "metadata": {
        "type": "object",
        "additionalProperties": true,
        "description": "Updated metadata for the conversation"
      }
    },
    "required": [
      "PCID",
      "conversationId"
    ]
  }
  ```
</Expandable>

***

## openai\_delete\_conversation

Delete a conversation

**Parameters:**

| Parameter        | Type   | Required | Default | Description               |
| ---------------- | ------ | -------- | ------- | ------------------------- |
| `conversationId` | string | Yes      | —       | Conversation ID to delete |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "conversationId": {
        "type": "string",
        "description": "Conversation ID to delete"
      }
    },
    "required": [
      "PCID",
      "conversationId"
    ]
  }
  ```
</Expandable>

***

## openai\_list\_items

List items in a conversation

**Parameters:**

| Parameter        | Type   | Required | Default  | Description                    |
| ---------------- | ------ | -------- | -------- | ------------------------------ |
| `conversationId` | string | Yes      | —        | Conversation ID                |
| `limit`          | number | No       | `20`     | Number of items to return      |
| `order`          | string | No       | `"desc"` | Sort order                     |
| `after`          | string | No       | —        | Cursor for pagination (after)  |
| `before`         | string | No       | —        | Cursor for pagination (before) |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "conversationId": {
        "type": "string",
        "description": "Conversation ID"
      },
      "limit": {
        "type": "number",
        "default": 20,
        "description": "Number of items to return"
      },
      "order": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc",
        "description": "Sort order"
      },
      "after": {
        "type": "string",
        "description": "Cursor for pagination (after)"
      },
      "before": {
        "type": "string",
        "description": "Cursor for pagination (before)"
      }
    },
    "required": [
      "PCID",
      "conversationId"
    ]
  }
  ```
</Expandable>

***

## openai\_create\_item

Create an item in a conversation

**Parameters:**

| Parameter        | Type   | Required | Default | Description                                                       |
| ---------------- | ------ | -------- | ------- | ----------------------------------------------------------------- |
| `conversationId` | string | Yes      | —       | Conversation ID                                                   |
| `type`           | string | Yes      | —       | Item type (e.g., message, function\_call, function\_call\_output) |
| `role`           | string | No       | —       | Message role (for message type items)                             |
| `content`        | string | No       | —       | Item content                                                      |
| `metadata`       | object | No       | —       | Custom metadata for the item                                      |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "conversationId": {
        "type": "string",
        "description": "Conversation ID"
      },
      "type": {
        "type": "string",
        "description": "Item type (e.g., message, function_call, function_call_output)"
      },
      "role": {
        "type": "string",
        "enum": [
          "system",
          "user",
          "assistant"
        ],
        "description": "Message role (for message type items)"
      },
      "content": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "array",
            "items": {
              "type": "unknown"
            }
          }
        ],
        "description": "Item content"
      },
      "metadata": {
        "type": "object",
        "additionalProperties": true,
        "description": "Custom metadata for the item"
      }
    },
    "required": [
      "PCID",
      "conversationId",
      "type"
    ]
  }
  ```
</Expandable>

***

## openai\_retrieve\_item

Retrieve an item from a conversation

**Parameters:**

| Parameter        | Type   | Required | Default | Description         |
| ---------------- | ------ | -------- | ------- | ------------------- |
| `conversationId` | string | Yes      | —       | Conversation ID     |
| `itemId`         | string | Yes      | —       | Item ID to retrieve |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "conversationId": {
        "type": "string",
        "description": "Conversation ID"
      },
      "itemId": {
        "type": "string",
        "description": "Item ID to retrieve"
      }
    },
    "required": [
      "PCID",
      "conversationId",
      "itemId"
    ]
  }
  ```
</Expandable>

***

## openai\_delete\_item

Delete an item from a conversation

**Parameters:**

| Parameter        | Type   | Required | Default | Description       |
| ---------------- | ------ | -------- | ------- | ----------------- |
| `conversationId` | string | Yes      | —       | Conversation ID   |
| `itemId`         | string | Yes      | —       | Item ID to delete |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "conversationId": {
        "type": "string",
        "description": "Conversation ID"
      },
      "itemId": {
        "type": "string",
        "description": "Item ID to delete"
      }
    },
    "required": [
      "PCID",
      "conversationId",
      "itemId"
    ]
  }
  ```
</Expandable>
