> ## 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.

# writer

> Writer AI platform — chat completions, knowledge graphs, file management, AI tools, vision, and translation via the Writer API

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

## Tools

| Tool                                                                          | Description                       |
| ----------------------------------------------------------------------------- | --------------------------------- |
| [`writer_add_file_to_graph`](#writer_add_file_to_graph)                       | Add file to graph                 |
| [`writer_analyze_vision`](#writer_analyze_vision)                             | Analyze images                    |
| [`writer_chat`](#writer_chat)                                                 | Chat completion                   |
| [`writer_completions`](#writer_completions)                                   | Text generation                   |
| [`writer_create_graph`](#writer_create_graph)                                 | Create graph                      |
| [`writer_delete_graph`](#writer_delete_graph)                                 | Delete graph                      |
| [`writer_find_graph_with_file_status`](#writer_find_graph_with_file_status)   | Retrieve graph                    |
| [`writer_find_graphs_with_file_status`](#writer_find_graphs_with_file_status) | List graphs                       |
| [`writer_gateway_delete_file`](#writer_gateway_delete_file)                   | Delete file                       |
| [`writer_gateway_download_file`](#writer_gateway_download_file)               | Download file                     |
| [`writer_gateway_get_file`](#writer_gateway_get_file)                         | Retrieve file                     |
| [`writer_gateway_get_files`](#writer_gateway_get_files)                       | List files                        |
| [`writer_gateway_retry_failed_files`](#writer_gateway_retry_failed_files)     | Retry failed files                |
| [`writer_gateway_upload_file`](#writer_gateway_upload_file)                   | Upload file                       |
| [`writer_generate_application_async`](#writer_generate_application_async)     | Generate from application (async) |
| [`writer_generate_content`](#writer_generate_content)                         | Generate from application         |
| [`writer_get_application`](#writer_get_application)                           | Application details               |
| [`writer_get_application_graphs`](#writer_get_application_graphs)             | Retrieve graphs                   |
| [`writer_get_application_job`](#writer_get_application_job)                   | Retrieve a single job             |
| [`writer_list_application_jobs`](#writer_list_application_jobs)               | Retrieve all jobs                 |
| [`writer_list_applications`](#writer_list_applications)                       | List applications                 |
| [`writer_models`](#writer_models)                                             | List models                       |
| [`writer_parse_pdf`](#writer_parse_pdf)                                       | Parse PDF                         |
| [`writer_question`](#writer_question)                                         | Question                          |
| [`writer_remove_file_from_graph`](#writer_remove_file_from_graph)             | Remove file from graph            |
| [`writer_retry_application_job`](#writer_retry_application_job)               | Retry job execution               |
| [`writer_translate`](#writer_translate)                                       | Translate text                    |
| [`writer_update_application_graphs`](#writer_update_application_graphs)       | Associate graphs                  |
| [`writer_update_graph`](#writer_update_graph)                                 | Update graph                      |
| [`writer_web_search`](#writer_web_search)                                     | Web search                        |

***

## writer\_add\_file\_to\_graph

Add file to graph

**Parameters:**

| Parameter  | Type   | Required | Default | Description                                   |
| ---------- | ------ | -------- | ------- | --------------------------------------------- |
| `graph_id` | string | Yes      | —       | The unique identifier of the Knowledge Graph. |
| `file_id`  | string | Yes      | —       | The unique identifier of the file.            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "graph_id": {
        "type": "string",
        "description": "The unique identifier of the Knowledge Graph."
      },
      "file_id": {
        "type": "string",
        "description": "The unique identifier of the file."
      }
    },
    "required": [
      "PCID",
      "graph_id",
      "file_id"
    ]
  }
  ```
</Expandable>

***

## writer\_analyze\_vision

Analyze images

**Parameters:**

| Parameter   | Type      | Required | Default | Description                                                                                                                                                                                                                                                                                                |
| ----------- | --------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `model`     | string    | Yes      | —       | The model to use for image analysis.                                                                                                                                                                                                                                                                       |
| `prompt`    | string    | Yes      | —       | The prompt to use for the image analysis. The prompt must include the name of each image variable, surrounded by double curly braces (`&#123;&#123;&#125;&#125;`). For example, `Describe the difference between the image &#123;&#123;image_1&#125;&#125; and the image &#123;&#123;image_2&#125;&#125;`. |
| `variables` | object\[] | Yes      | —       | The variables value                                                                                                                                                                                                                                                                                        |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "model": {
        "type": "string",
        "description": "The model to use for image analysis.",
        "enum": [
          "palmyra-vision"
        ]
      },
      "prompt": {
        "type": "string",
        "description": "The prompt to use for the image analysis. The prompt must include the name of each image variable, surrounded by double curly braces (`{{}}`). For example, `Describe the difference between the image {{image_1}} and the image {{image_2}}`."
      },
      "variables": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of the file variable. You must reference this name in the prompt with double curly braces (`{{}}`). For example, `Describe the difference between the image {{image_1}} and the image {{image_2}}`."
            },
            "file_id": {
              "type": "string",
              "description": "The File ID of the file to analyze. The file must be uploaded to the Writer platform before it can be used in a vision request. Supported file types: JPG, PNG, PDF, TXT (max 7MB each)."
            }
          },
          "required": [
            "name",
            "file_id"
          ]
        },
        "description": "The variables value"
      }
    },
    "required": [
      "PCID",
      "model",
      "prompt",
      "variables"
    ]
  }
  ```
</Expandable>

***

## writer\_chat

Chat completion

**Parameters:**

| Parameter         | Type      | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ----------------- | --------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `logprobs`        | boolean   | No       | —       | Specifies whether to return log probabilities of the output tokens.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `max_tokens`      | integer   | No       | —       | Defines the maximum number of tokens (words and characters) that the model can generate in the response. This can be adjusted to allow for longer or shorter responses as needed. The maximum value varies by model. See the [models overview](/home/models) for more information about the maximum number of tokens for each model.                                                                                                                                                                                                                |
| `messages`        | object\[] | Yes      | —       | An array of message objects that form the conversation history or context for the model to respond to. The array must contain at least one message.                                                                                                                                                                                                                                                                                                                                                                                                 |
| `model`           | string    | Yes      | —       | The [ID of the model](https://dev.writer.com/home/models) to use for creating the chat completion. Supports `palmyra-x5`, `palmyra-x4`, `palmyra-fin`, `palmyra-med`, `palmyra-creative`, and `palmyra-x-003-instruct`.                                                                                                                                                                                                                                                                                                                             |
| `n`               | integer   | No       | —       | Specifies the number of completions (responses) to generate from the model in a single request. This parameter allows for generating multiple responses, offering a variety of potential replies from which to choose.                                                                                                                                                                                                                                                                                                                              |
| `response_format` | object    | No       | —       | The response format to use for the chat completion, available with `palmyra-x4` and `palmyra-x5`.  `text` is the default response format. [JSON Schema](https://json-schema.org/) is supported for structured responses. If you specify `json_schema`, you must also provide a `json_schema` object.                                                                                                                                                                                                                                                |
| `stop`            | string\[] | No       | —       | A token or sequence of tokens that, when generated, will cause the model to stop producing further content. This can be a single token or an array of tokens, acting as a signal to end the output.                                                                                                                                                                                                                                                                                                                                                 |
| `stream`          | boolean   | No       | —       | Indicates whether the response should be streamed incrementally as it is generated or only returned once fully complete. Streaming can be useful for providing real-time feedback in interactive applications.                                                                                                                                                                                                                                                                                                                                      |
| `stream_options`  | object    | No       | —       | Additional options for streaming.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `temperature`     | number    | No       | —       | Controls the randomness or creativity of the model's responses. A higher temperature results in more varied and less predictable text, while a lower temperature produces more deterministic and conservative outputs.                                                                                                                                                                                                                                                                                                                              |
| `tool_choice`     | object    | No       | —       | Configure how the model will call functions: - `auto`: allows the model to automatically choose the tool to use, or not call a tool - `none`: disables tool calling; the model will instead generate a message - `required`: requires the model to call one or more tools  You can also use a JSON object to force the model to call a specific tool. For example, `&#123;"type": "function", "function": &#123;"name": "get_current_weather"&#125;&#125;` requires the model to call the `get_current_weather` function, regardless of the prompt. |
| `tools`           | object\[] | No       | —       | An array containing tool definitions for tools that the model can use to generate responses. The tool definitions use JSON schema. You can define your own functions or use one of the built-in `graph`, `llm`, `translation`, or `vision` tools. Note that you can only use one built-in tool type in the array (only one of `graph`, `llm`, `translation`, or `vision`). You can pass multiple [custom tools](https://dev.writer.com/home/tool-calling) of type `function` in the same request.                                                   |
| `top_p`           | number    | No       | —       | Sets the threshold for "nucleus sampling," a technique to focus the model's token generation on the most likely subset of tokens. Only tokens with cumulative probability above this threshold are considered, controlling the trade-off between creativity and coherence.                                                                                                                                                                                                                                                                          |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "logprobs": {
        "type": "boolean",
        "description": "Specifies whether to return log probabilities of the output tokens."
      },
      "max_tokens": {
        "type": "integer",
        "description": "Defines the maximum number of tokens (words and characters) that the model can generate in the response. This can be adjusted to allow for longer or shorter responses as needed. The maximum value varies by model. See the [models overview](/home/models) for more information about the maximum number of tokens for each model."
      },
      "messages": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "content": {
              "description": "The content of the message. Can be either a string (for text-only messages) or an array of content fragments (for mixed text and image messages)."
            },
            "role": {
              "type": "string",
              "enum": [
                "user",
                "assistant",
                "system",
                "tool"
              ],
              "description": "The role of the chat message. You can provide a system prompt by setting the role to `system`, or specify that a message is the result of a [tool call](https://dev.writer.com/home/tool-calling) by setting the role to `tool`."
            },
            "name": {
              "type": "string",
              "description": "An optional name for the message sender. Useful for identifying different users, personas, or tools in multi-participant conversations."
            },
            "tool_call_id": {
              "type": "string",
              "description": "Tool Call Id"
            },
            "tool_calls": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "index": {
                    "type": "integer"
                  },
                  "id": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "function": {
                    "type": "object"
                  }
                }
              },
              "description": "Tool Calls"
            },
            "graph_data": {
              "type": "object",
              "description": "Graph Data"
            },
            "refusal": {
              "type": "string",
              "description": "The refusal value"
            }
          },
          "required": [
            "role"
          ]
        },
        "description": "An array of message objects that form the conversation history or context for the model to respond to. The array must contain at least one message."
      },
      "model": {
        "type": "string",
        "description": "The [ID of the model](https://dev.writer.com/home/models) to use for creating the chat completion. Supports `palmyra-x5`, `palmyra-x4`, `palmyra-fin`, `palmyra-med`, `palmyra-creative`, and `palmyra-x-003-instruct`."
      },
      "n": {
        "type": "integer",
        "description": "Specifies the number of completions (responses) to generate from the model in a single request. This parameter allows for generating multiple responses, offering a variety of potential replies from which to choose."
      },
      "response_format": {
        "type": "object",
        "description": "The response format to use for the chat completion, available with `palmyra-x4` and `palmyra-x5`.  `text` is the default response format. [JSON Schema](https://json-schema.org/) is supported for structured responses. If you specify `json_schema`, you must also provide a `json_schema` object.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of response format to use.",
            "enum": [
              "text",
              "json_schema"
            ]
          },
          "json_schema": {
            "type": "object",
            "description": "The JSON schema to use for the response format."
          }
        },
        "required": [
          "type"
        ]
      },
      "stop": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "A token or sequence of tokens that, when generated, will cause the model to stop producing further content. This can be a single token or an array of tokens, acting as a signal to end the output."
      },
      "stream": {
        "type": "boolean",
        "description": "Indicates whether the response should be streamed incrementally as it is generated or only returned once fully complete. Streaming can be useful for providing real-time feedback in interactive applications."
      },
      "stream_options": {
        "type": "object",
        "description": "Additional options for streaming.",
        "properties": {
          "include_usage": {
            "type": "boolean",
            "description": "Indicate whether to include usage information."
          }
        },
        "required": [
          "include_usage"
        ]
      },
      "temperature": {
        "type": "number",
        "description": "Controls the randomness or creativity of the model's responses. A higher temperature results in more varied and less predictable text, while a lower temperature produces more deterministic and conservative outputs."
      },
      "tool_choice": {
        "description": "Configure how the model will call functions: - `auto`: allows the model to automatically choose the tool to use, or not call a tool - `none`: disables tool calling; the model will instead generate a message - `required`: requires the model to call one or more tools  You can also use a JSON object to force the model to call a specific tool. For example, `{\"type\": \"function\", \"function\": {\"name\": \"get_current_weather\"}}` requires the model to call the `get_current_weather` function, regardless of the prompt."
      },
      "tools": {
        "type": "array",
        "items": {
          "type": "object"
        },
        "description": "An array containing tool definitions for tools that the model can use to generate responses. The tool definitions use JSON schema. You can define your own functions or use one of the built-in `graph`, `llm`, `translation`, or `vision` tools. Note that you can only use one built-in tool type in the array (only one of `graph`, `llm`, `translation`, or `vision`). You can pass multiple [custom tools](https://dev.writer.com/home/tool-calling) of type `function` in the same request."
      },
      "top_p": {
        "type": "number",
        "description": "Sets the threshold for \"nucleus sampling,\" a technique to focus the model's token generation on the most likely subset of tokens. Only tokens with cumulative probability above this threshold are considered, controlling the trade-off between creativity and coherence."
      }
    },
    "required": [
      "PCID",
      "messages",
      "model"
    ]
  }
  ```
</Expandable>

***

## writer\_completions

Text generation

**Parameters:**

| Parameter     | Type      | Required | Default | Description                                                                                                                                                                                                |
| ------------- | --------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `best_of`     | integer   | No       | —       | Specifies the number of completions to generate and return the best one. Useful for generating multiple outputs and choosing the best based on some criteria.                                              |
| `max_tokens`  | integer   | No       | —       | The maximum number of tokens that the model can generate in the response.                                                                                                                                  |
| `model`       | string    | Yes      | —       | The [ID of the model](https://dev.writer.com/home/models) to use for generating text. Supports `palmyra-x5`, `palmyra-x4`, `palmyra-fin`, `palmyra-med`, `palmyra-creative`, and `palmyra-x-003-instruct`. |
| `prompt`      | string    | Yes      | —       | The input text that the model will process to generate a response.                                                                                                                                         |
| `random_seed` | integer   | No       | —       | A seed used to initialize the random number generator for the model, ensuring reproducibility of the output when the same inputs are provided.                                                             |
| `stop`        | string\[] | No       | —       | Specifies stopping conditions for the model's output generation. This can be an array of strings or a single string that the model will look for as a signal to stop generating further tokens.            |
| `stream`      | boolean   | No       | —       | Determines whether the model's output should be streamed. If true, the output is generated and sent incrementally, which can be useful for real-time applications.                                         |
| `temperature` | number    | No       | —       | Controls the randomness of the model's outputs. Higher values lead to more random outputs, while lower values make the model more deterministic.                                                           |
| `top_p`       | number    | No       | —       | Used to control the nucleus sampling, where only the most probable tokens with a cumulative probability of top\_p are considered for sampling, providing a way to fine-tune the randomness of predictions. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "best_of": {
        "type": "integer",
        "description": "Specifies the number of completions to generate and return the best one. Useful for generating multiple outputs and choosing the best based on some criteria."
      },
      "max_tokens": {
        "type": "integer",
        "description": "The maximum number of tokens that the model can generate in the response."
      },
      "model": {
        "type": "string",
        "description": "The [ID of the model](https://dev.writer.com/home/models) to use for generating text. Supports `palmyra-x5`, `palmyra-x4`, `palmyra-fin`, `palmyra-med`, `palmyra-creative`, and `palmyra-x-003-instruct`."
      },
      "prompt": {
        "type": "string",
        "description": "The input text that the model will process to generate a response."
      },
      "random_seed": {
        "type": "integer",
        "description": "A seed used to initialize the random number generator for the model, ensuring reproducibility of the output when the same inputs are provided."
      },
      "stop": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Specifies stopping conditions for the model's output generation. This can be an array of strings or a single string that the model will look for as a signal to stop generating further tokens."
      },
      "stream": {
        "type": "boolean",
        "description": "Determines whether the model's output should be streamed. If true, the output is generated and sent incrementally, which can be useful for real-time applications."
      },
      "temperature": {
        "type": "number",
        "description": "Controls the randomness of the model's outputs. Higher values lead to more random outputs, while lower values make the model more deterministic."
      },
      "top_p": {
        "type": "number",
        "description": "Used to control the nucleus sampling, where only the most probable tokens with a cumulative probability of top_p are considered for sampling, providing a way to fine-tune the randomness of predictions."
      }
    },
    "required": [
      "PCID",
      "model",
      "prompt"
    ]
  }
  ```
</Expandable>

***

## writer\_create\_graph

Create graph

**Parameters:**

| Parameter     | Type   | Required | Default | Description                                                                                                      |
| ------------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------------------- |
| `description` | string | No       | —       | A description of the Knowledge Graph (max 255 characters). Omitting this field leaves the description unchanged. |
| `name`        | string | No       | —       | The name of the Knowledge Graph (max 255 characters). Omitting this field leaves the name unchanged.             |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "description": {
        "type": "string",
        "description": "A description of the Knowledge Graph (max 255 characters). Omitting this field leaves the description unchanged."
      },
      "name": {
        "type": "string",
        "description": "The name of the Knowledge Graph (max 255 characters). Omitting this field leaves the name unchanged."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## writer\_delete\_graph

Delete graph

**Parameters:**

| Parameter  | Type   | Required | Default | Description                                   |
| ---------- | ------ | -------- | ------- | --------------------------------------------- |
| `graph_id` | string | Yes      | —       | The unique identifier of the Knowledge Graph. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "graph_id": {
        "type": "string",
        "description": "The unique identifier of the Knowledge Graph."
      }
    },
    "required": [
      "PCID",
      "graph_id"
    ]
  }
  ```
</Expandable>

***

## writer\_find\_graph\_with\_file\_status

Retrieve graph

**Parameters:**

| Parameter  | Type   | Required | Default | Description                                   |
| ---------- | ------ | -------- | ------- | --------------------------------------------- |
| `graph_id` | string | Yes      | —       | The unique identifier of the Knowledge Graph. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "graph_id": {
        "type": "string",
        "description": "The unique identifier of the Knowledge Graph."
      }
    },
    "required": [
      "PCID",
      "graph_id"
    ]
  }
  ```
</Expandable>

***

## writer\_find\_graphs\_with\_file\_status

List graphs

**Parameters:**

| Parameter | Type    | Required | Default | Description                                                                                                                                |
| --------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `order`   | string  | No       | —       | Specifies the order of the results. Valid values are asc for ascending and desc for descending.                                            |
| `before`  | string  | No       | —       | The ID of the first object in the previous page. This parameter instructs the API to return the previous page of results.                  |
| `after`   | string  | No       | —       | The ID of the last object in the previous page. This parameter instructs the API to return the next page of results.                       |
| `limit`   | integer | No       | —       | Specifies the maximum number of objects returned in a page. The default value is 50. The minimum value is 1, and the maximum value is 100. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "order": {
        "type": "string",
        "description": "Specifies the order of the results. Valid values are asc for ascending and desc for descending.",
        "enum": [
          "asc",
          "desc"
        ]
      },
      "before": {
        "type": "string",
        "description": "The ID of the first object in the previous page. This parameter instructs the API to return the previous page of results."
      },
      "after": {
        "type": "string",
        "description": "The ID of the last object in the previous page. This parameter instructs the API to return the next page of results."
      },
      "limit": {
        "type": "integer",
        "description": "Specifies the maximum number of objects returned in a page. The default value is 50. The minimum value is 1, and the maximum value is 100."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## writer\_gateway\_delete\_file

Delete file

**Parameters:**

| Parameter | Type   | Required | Default | Description                        |
| --------- | ------ | -------- | ------- | ---------------------------------- |
| `file_id` | string | Yes      | —       | The unique identifier of the file. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "file_id": {
        "type": "string",
        "description": "The unique identifier of the file."
      }
    },
    "required": [
      "PCID",
      "file_id"
    ]
  }
  ```
</Expandable>

***

## writer\_gateway\_download\_file

Download file

**Parameters:**

| Parameter | Type   | Required | Default | Description                        |
| --------- | ------ | -------- | ------- | ---------------------------------- |
| `file_id` | string | Yes      | —       | The unique identifier of the file. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "file_id": {
        "type": "string",
        "description": "The unique identifier of the file."
      }
    },
    "required": [
      "PCID",
      "file_id"
    ]
  }
  ```
</Expandable>

***

## writer\_gateway\_get\_file

Retrieve file

**Parameters:**

| Parameter | Type   | Required | Default | Description                        |
| --------- | ------ | -------- | ------- | ---------------------------------- |
| `file_id` | string | Yes      | —       | The unique identifier of the file. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "file_id": {
        "type": "string",
        "description": "The unique identifier of the file."
      }
    },
    "required": [
      "PCID",
      "file_id"
    ]
  }
  ```
</Expandable>

***

## writer\_gateway\_get\_files

List files

**Parameters:**

| Parameter    | Type    | Required | Default | Description                                                                                                                                |
| ------------ | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `before`     | string  | No       | —       | The ID of the first object in the previous page. This parameter instructs the API to return the previous page of results.                  |
| `after`      | string  | No       | —       | The ID of the last object in the previous page. This parameter instructs the API to return the next page of results.                       |
| `limit`      | integer | No       | —       | Specifies the maximum number of objects returned in a page. The default value is 50. The minimum value is 1, and the maximum value is 100. |
| `order`      | string  | No       | —       | Specifies the order of the results. Valid values are asc for ascending and desc for descending.                                            |
| `graph_id`   | string  | No       | —       | The unique identifier of the graph to which the files belong.                                                                              |
| `status`     | object  | No       | —       | Specifies the status of the files to retrieve. Valid values are in\_progress, completed or failed.                                         |
| `file_types` | string  | No       | —       | The extensions of the files to retrieve. Separate multiple extensions with a comma. For example: `pdf,jpg,docx`.                           |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "before": {
        "type": "string",
        "description": "The ID of the first object in the previous page. This parameter instructs the API to return the previous page of results."
      },
      "after": {
        "type": "string",
        "description": "The ID of the last object in the previous page. This parameter instructs the API to return the next page of results."
      },
      "limit": {
        "type": "integer",
        "description": "Specifies the maximum number of objects returned in a page. The default value is 50. The minimum value is 1, and the maximum value is 100."
      },
      "order": {
        "type": "string",
        "description": "Specifies the order of the results. Valid values are asc for ascending and desc for descending.",
        "enum": [
          "asc",
          "desc"
        ]
      },
      "graph_id": {
        "type": "string",
        "description": "The unique identifier of the graph to which the files belong."
      },
      "status": {
        "description": "Specifies the status of the files to retrieve. Valid values are in_progress, completed or failed.",
        "enum": [
          "in_progress",
          "completed",
          "failed"
        ]
      },
      "file_types": {
        "type": "string",
        "description": "The extensions of the files to retrieve. Separate multiple extensions with a comma. For example: `pdf,jpg,docx`."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## writer\_gateway\_retry\_failed\_files

Retry failed files

**Parameters:**

| Parameter  | Type      | Required | Default | Description                                  |
| ---------- | --------- | -------- | ------- | -------------------------------------------- |
| `file_ids` | string\[] | Yes      | —       | The unique identifier of the files to retry. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "file_ids": {
        "type": "array",
        "items": {
          "type": "string",
          "format": "uuid"
        },
        "description": "The unique identifier of the files to retry."
      }
    },
    "required": [
      "PCID",
      "file_ids"
    ]
  }
  ```
</Expandable>

***

## writer\_gateway\_upload\_file

Upload file

**Parameters:**

| Parameter             | Type    | Required | Default | Description                                                                                                                                                                                                                                                             |
| --------------------- | ------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Content-Disposition` | string  | Yes      | —       | The disposition type of the file, typically used to indicate the form-data name. Use `attachment` with the filename parameter to specify the name of the file, for example: `attachment; filename=example.pdf`.                                                         |
| `Content-Type`        | string  | Yes      | —       | The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/MIME_types/Common_types) of the file being uploaded. Supports `txt`, `doc`, `docx`, `ppt`, `pptx`, `jpg`, `png`, `eml`, `html`, `pdf`, `srt`, `csv`, `xls`, `xlsx`, `mp3`, and `mp4` file extensions. |
| `Content-Length`      | integer | Yes      | —       | The size of the file in bytes.                                                                                                                                                                                                                                          |
| `graphId`             | string  | No       | —       | The unique identifier of the Knowledge Graph to associate the uploaded file with.  Note: The response from the upload endpoint does not include the `graphId` field, but the association will be visible when you retrieve the file using the file retrieval endpoint.  |
| `body`                | string  | Yes      | —       | Request body                                                                                                                                                                                                                                                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "Content-Disposition": {
        "type": "string",
        "description": "The disposition type of the file, typically used to indicate the form-data name. Use `attachment` with the filename parameter to specify the name of the file, for example: `attachment; filename=example.pdf`."
      },
      "Content-Type": {
        "type": "string",
        "description": "The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/MIME_types/Common_types) of the file being uploaded. Supports `txt`, `doc`, `docx`, `ppt`, `pptx`, `jpg`, `png`, `eml`, `html`, `pdf`, `srt`, `csv`, `xls`, `xlsx`, `mp3`, and `mp4` file extensions."
      },
      "Content-Length": {
        "type": "integer",
        "description": "The size of the file in bytes."
      },
      "graphId": {
        "type": "string",
        "description": "The unique identifier of the Knowledge Graph to associate the uploaded file with.  Note: The response from the upload endpoint does not include the `graphId` field, but the association will be visible when you retrieve the file using the file retrieval endpoint."
      },
      "body": {
        "type": "string",
        "description": "Request body"
      }
    },
    "required": [
      "PCID",
      "Content-Disposition",
      "Content-Type",
      "Content-Length",
      "body"
    ]
  }
  ```
</Expandable>

***

## writer\_generate\_application\_async

Generate from application (async)

**Parameters:**

| Parameter        | Type      | Required | Default | Description                                          |
| ---------------- | --------- | -------- | ------- | ---------------------------------------------------- |
| `application_id` | string    | Yes      | —       | The ID of the no-code app for which to create a job. |
| `inputs`         | object\[] | Yes      | —       | A list of input objects to generate content for.     |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "application_id": {
        "type": "string",
        "description": "The ID of the no-code app for which to create a job."
      },
      "inputs": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "The unique identifier for the input field from the application. All input types from the No-code application are supported (i.e. Text input, Dropdown, File upload, Image input). The identifier should be the name of the input type."
            },
            "value": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "The value for the input field.   If the input type is \"File upload\", you must pass the `file_id` of an uploaded file. You cannot pass a file object directly. See the [file upload endpoint](https://dev.writer.com/api-reference/file-api/upload-files) for instructions on uploading files or the [list files endpoint](https://dev.writer.com/api-reference/file-api/get-all-files) for how to see a list of uploaded files and their IDs."
            }
          },
          "required": [
            "id",
            "value"
          ]
        },
        "description": "A list of input objects to generate content for."
      }
    },
    "required": [
      "PCID",
      "application_id",
      "inputs"
    ]
  }
  ```
</Expandable>

***

## writer\_generate\_content

Generate from application

**Parameters:**

| Parameter        | Type      | Required | Default | Description                                                                                                      |
| ---------------- | --------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------- |
| `application_id` | string    | Yes      | —       | The unique identifier of a [no-code agent](/no-code/introduction) in AI Studio.                                  |
| `inputs`         | object\[] | Yes      | —       | The inputs value                                                                                                 |
| `stream`         | boolean   | No       | —       | Indicates whether the response should be streamed. Currently only supported for research assistant applications. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "application_id": {
        "type": "string",
        "description": "The unique identifier of a [no-code agent](/no-code/introduction) in AI Studio."
      },
      "inputs": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "The unique identifier for the input field from the application. All input types from the No-code application are supported (i.e. Text input, Dropdown, File upload, Image input). The identifier should be the name of the input type."
            },
            "value": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "The value for the input field.   If the input type is \"File upload\", you must pass the `file_id` of an uploaded file. You cannot pass a file object directly. See the [file upload endpoint](https://dev.writer.com/api-reference/file-api/upload-files) for instructions on uploading files or the [list files endpoint](https://dev.writer.com/api-reference/file-api/get-all-files) for how to see a list of uploaded files and their IDs."
            }
          },
          "required": [
            "id",
            "value"
          ]
        },
        "description": "The inputs value"
      },
      "stream": {
        "type": "boolean",
        "description": "Indicates whether the response should be streamed. Currently only supported for research assistant applications."
      }
    },
    "required": [
      "PCID",
      "application_id",
      "inputs"
    ]
  }
  ```
</Expandable>

***

## writer\_get\_application

Application details

**Parameters:**

| Parameter        | Type   | Required | Default | Description                                       |
| ---------------- | ------ | -------- | ------- | ------------------------------------------------- |
| `application_id` | string | Yes      | —       | Unique identifier of the application to retrieve. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "application_id": {
        "type": "string",
        "description": "Unique identifier of the application to retrieve."
      }
    },
    "required": [
      "PCID",
      "application_id"
    ]
  }
  ```
</Expandable>

***

## writer\_get\_application\_graphs

Retrieve graphs

**Parameters:**

| Parameter        | Type   | Required | Default | Description                                                         |
| ---------------- | ------ | -------- | ------- | ------------------------------------------------------------------- |
| `application_id` | string | Yes      | —       | The ID of the no-code agent for which to retrieve Knowledge Graphs. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "application_id": {
        "type": "string",
        "description": "The ID of the no-code agent for which to retrieve Knowledge Graphs."
      }
    },
    "required": [
      "PCID",
      "application_id"
    ]
  }
  ```
</Expandable>

***

## writer\_get\_application\_job

Retrieve a single job

**Parameters:**

| Parameter | Type   | Required | Default | Description                    |
| --------- | ------ | -------- | ------- | ------------------------------ |
| `job_id`  | string | Yes      | —       | The ID of the job to retrieve. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "job_id": {
        "type": "string",
        "description": "The ID of the job to retrieve."
      }
    },
    "required": [
      "PCID",
      "job_id"
    ]
  }
  ```
</Expandable>

***

## writer\_list\_application\_jobs

Retrieve all jobs

**Parameters:**

| Parameter        | Type    | Required | Default | Description                                           |
| ---------------- | ------- | -------- | ------- | ----------------------------------------------------- |
| `application_id` | string  | Yes      | —       | The ID of the no-code app for which to retrieve jobs. |
| `status`         | string  | No       | —       | The status of the job.                                |
| `offset`         | integer | No       | —       | The pagination offset for retrieving the jobs.        |
| `limit`          | integer | No       | —       | The pagination limit for retrieving the jobs.         |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "application_id": {
        "type": "string",
        "description": "The ID of the no-code app for which to retrieve jobs."
      },
      "status": {
        "type": "string",
        "description": "The status of the job.",
        "enum": [
          "in_progress",
          "failed",
          "completed"
        ]
      },
      "offset": {
        "type": "integer",
        "description": "The pagination offset for retrieving the jobs."
      },
      "limit": {
        "type": "integer",
        "description": "The pagination limit for retrieving the jobs."
      }
    },
    "required": [
      "PCID",
      "application_id"
    ]
  }
  ```
</Expandable>

***

## writer\_list\_applications

List applications

**Parameters:**

| Parameter | Type    | Required | Default | Description                                               |
| --------- | ------- | -------- | ------- | --------------------------------------------------------- |
| `order`   | string  | No       | —       | Sort order for the results based on creation time.        |
| `before`  | string  | No       | —       | Return results before this application ID for pagination. |
| `after`   | string  | No       | —       | Return results after this application ID for pagination.  |
| `limit`   | integer | No       | —       | Maximum number of applications to return in the response. |
| `type`    | string  | No       | —       | Filter applications by their type.                        |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "order": {
        "type": "string",
        "description": "Sort order for the results based on creation time.",
        "enum": [
          "asc",
          "desc"
        ]
      },
      "before": {
        "type": "string",
        "description": "Return results before this application ID for pagination."
      },
      "after": {
        "type": "string",
        "description": "Return results after this application ID for pagination."
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of applications to return in the response."
      },
      "type": {
        "type": "string",
        "description": "Filter applications by their type.",
        "enum": [
          "generation"
        ]
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## writer\_models

List models

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

***

## writer\_parse\_pdf

Parse PDF

**Parameters:**

| Parameter | Type   | Required | Default | Description                                                |
| --------- | ------ | -------- | ------- | ---------------------------------------------------------- |
| `file_id` | string | Yes      | —       | The unique identifier of the file.                         |
| `format`  | string | Yes      | —       | The format into which the PDF content should be converted. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "file_id": {
        "type": "string",
        "description": "The unique identifier of the file."
      },
      "format": {
        "type": "string",
        "description": "The format into which the PDF content should be converted.",
        "enum": [
          "text",
          "markdown"
        ]
      }
    },
    "required": [
      "PCID",
      "file_id",
      "format"
    ]
  }
  ```
</Expandable>

***

## writer\_question

Question

**Parameters:**

| Parameter      | Type      | Required | Default | Description                                                                                                                                                        |
| -------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `graph_ids`    | string\[] | Yes      | —       | The unique identifiers of the Knowledge Graphs to query.                                                                                                           |
| `query_config` | object    | No       | —       | Configuration options for Knowledge Graph queries.                                                                                                                 |
| `question`     | string    | Yes      | —       | The question to answer using the Knowledge Graph.                                                                                                                  |
| `stream`       | boolean   | No       | —       | Determines whether the model's output should be streamed. If true, the output is generated and sent incrementally, which can be useful for real-time applications. |
| `subqueries`   | boolean   | No       | —       | Specify whether to include subqueries.                                                                                                                             |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "graph_ids": {
        "type": "array",
        "items": {
          "type": "string",
          "format": "uuid"
        },
        "description": "The unique identifiers of the Knowledge Graphs to query."
      },
      "query_config": {
        "type": "object",
        "description": "Configuration options for Knowledge Graph queries.",
        "properties": {
          "max_subquestions": {
            "type": "integer",
            "description": "Maximum number of subquestions to generate when processing complex queries. Set higher to improve detail, set lower to reduce response time. Range: 1-10, Default: 6."
          },
          "search_weight": {
            "type": "integer",
            "description": "Weight given to search results when ranking and selecting relevant information. Higher values (closer to 100) prioritize keyword-based matching, while lower values (closer to 0) prioritize semantic similarity matching. Use higher values for exact keyword searches, lower values for conceptual similarity searches. Range: 0-100, Default: 50."
          },
          "grounding_level": {
            "type": "number",
            "description": "Level of grounding required for responses, controlling how closely answers must be tied to source material. Set lower for grounded outputs, higher for creativity. Higher values (closer to 1.0) allow more creative interpretation, while lower values (closer to 0.0) stick more closely to source material. Range: 0.0-1.0, Default: 0.0."
          },
          "max_snippets": {
            "type": "integer",
            "description": "Maximum number of text snippets to retrieve from the Knowledge Graph for context. Works in concert with `search_weight` to control best matches vs broader coverage. While technically supports 1-60, values below 5 may return no results due to RAG implementation. Recommended range: 5-25. Due to RAG system behavior, you may see more snippets than requested. Range: 1-60, Default: 30."
          },
          "max_tokens": {
            "type": "integer",
            "description": "Maximum number of tokens the model can generate in the response. This controls the length of the AI's answer. Set higher for longer answers, set lower for shorter, faster answers. Range: 100-8000, Default: 4000."
          },
          "keyword_threshold": {
            "type": "number",
            "description": "Threshold for keyword-based matching when searching Knowledge Graph content. Set higher for stricter relevance, lower for broader range. Higher values (closer to 1.0) require stronger keyword matches, while lower values (closer to 0.0) allow more lenient matching. Range: 0.0-1.0, Default: 0.7."
          },
          "semantic_threshold": {
            "type": "number",
            "description": "Threshold for semantic similarity matching when searching Knowledge Graph content. Set higher for stricter relevance, lower for broader range. Higher values (closer to 1.0) require stronger semantic similarity, while lower values (closer to 0.0) allow more lenient semantic matching. Range: 0.0-1.0, Default: 0.7."
          },
          "inline_citations": {
            "type": "boolean",
            "description": "Whether to include inline citations in the response, showing which Knowledge Graph sources were used. Default: false."
          }
        }
      },
      "question": {
        "type": "string",
        "description": "The question to answer using the Knowledge Graph."
      },
      "stream": {
        "type": "boolean",
        "description": "Determines whether the model's output should be streamed. If true, the output is generated and sent incrementally, which can be useful for real-time applications."
      },
      "subqueries": {
        "type": "boolean",
        "description": "Specify whether to include subqueries."
      }
    },
    "required": [
      "PCID",
      "graph_ids",
      "question"
    ]
  }
  ```
</Expandable>

***

## writer\_remove\_file\_from\_graph

Remove file from graph

**Parameters:**

| Parameter  | Type   | Required | Default | Description                                                             |
| ---------- | ------ | -------- | ------- | ----------------------------------------------------------------------- |
| `graph_id` | string | Yes      | —       | The unique identifier of the Knowledge Graph to which the files belong. |
| `file_id`  | string | Yes      | —       | The unique identifier of the file.                                      |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "graph_id": {
        "type": "string",
        "description": "The unique identifier of the Knowledge Graph to which the files belong."
      },
      "file_id": {
        "type": "string",
        "description": "The unique identifier of the file."
      }
    },
    "required": [
      "PCID",
      "graph_id",
      "file_id"
    ]
  }
  ```
</Expandable>

***

## writer\_retry\_application\_job

Retry job execution

**Parameters:**

| Parameter | Type   | Required | Default | Description                 |
| --------- | ------ | -------- | ------- | --------------------------- |
| `job_id`  | string | Yes      | —       | The ID of the job to retry. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "job_id": {
        "type": "string",
        "description": "The ID of the job to retry."
      }
    },
    "required": [
      "PCID",
      "job_id"
    ]
  }
  ```
</Expandable>

***

## writer\_translate

Translate text

**Parameters:**

| Parameter              | Type    | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ---------------------- | ------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `formality`            | boolean | Yes      | —       | Whether to use formal or informal language in the translation. See the [list of languages that support formality](https://dev.writer.com/api-reference/translation-api/language-support#formality). If the language does not support formality, this parameter is ignored.                                                                                                                                                                                                                                                                                 |
| `length_control`       | boolean | Yes      | —       | Whether to control the length of the translated text. See the [list of languages that support length control](https://dev.writer.com/api-reference/translation-api/language-support#length-control). If the language does not support length control, this parameter is ignored.                                                                                                                                                                                                                                                                           |
| `mask_profanity`       | boolean | Yes      | —       | Whether to mask profane words in the translated text. See the [list of languages that do not support profanity masking](https://dev.writer.com/api-reference/translation-api/language-support#profanity-masking). If the language does not support profanity masking, this parameter is ignored.                                                                                                                                                                                                                                                           |
| `model`                | string  | Yes      | —       | The model to use for translation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `source_language_code` | string  | Yes      | —       | The [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) language code of the original text to translate. For example, `en` for English, `zh` for Chinese, `fr` for French, `es` for Spanish. If the language has a variant, the code appends the two-digit [ISO-3166 country code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes). For example, Mexican Spanish is `es-MX`. See the [list of supported languages and language codes](https://dev.writer.com/api-reference/translation-api/language-support).          |
| `target_language_code` | string  | Yes      | —       | The [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) language code of the target language for the translation. For example, `en` for English, `zh` for Chinese, `fr` for French, `es` for Spanish. If the language has a variant, the code appends the two-digit [ISO-3166 country code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes). For example, Mexican Spanish is `es-MX`. See the [list of supported languages and language codes](https://dev.writer.com/api-reference/translation-api/language-support). |
| `text`                 | string  | Yes      | —       | The text to translate. Maximum of 100,000 words.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "formality": {
        "type": "boolean",
        "description": "Whether to use formal or informal language in the translation. See the [list of languages that support formality](https://dev.writer.com/api-reference/translation-api/language-support#formality). If the language does not support formality, this parameter is ignored."
      },
      "length_control": {
        "type": "boolean",
        "description": "Whether to control the length of the translated text. See the [list of languages that support length control](https://dev.writer.com/api-reference/translation-api/language-support#length-control). If the language does not support length control, this parameter is ignored."
      },
      "mask_profanity": {
        "type": "boolean",
        "description": "Whether to mask profane words in the translated text. See the [list of languages that do not support profanity masking](https://dev.writer.com/api-reference/translation-api/language-support#profanity-masking). If the language does not support profanity masking, this parameter is ignored."
      },
      "model": {
        "type": "string",
        "description": "The model to use for translation.",
        "enum": [
          "palmyra-translate"
        ]
      },
      "source_language_code": {
        "type": "string",
        "description": "The [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) language code of the original text to translate. For example, `en` for English, `zh` for Chinese, `fr` for French, `es` for Spanish. If the language has a variant, the code appends the two-digit [ISO-3166 country code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes). For example, Mexican Spanish is `es-MX`. See the [list of supported languages and language codes](https://dev.writer.com/api-reference/translation-api/language-support)."
      },
      "target_language_code": {
        "type": "string",
        "description": "The [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) language code of the target language for the translation. For example, `en` for English, `zh` for Chinese, `fr` for French, `es` for Spanish. If the language has a variant, the code appends the two-digit [ISO-3166 country code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes). For example, Mexican Spanish is `es-MX`. See the [list of supported languages and language codes](https://dev.writer.com/api-reference/translation-api/language-support)."
      },
      "text": {
        "type": "string",
        "description": "The text to translate. Maximum of 100,000 words."
      }
    },
    "required": [
      "PCID",
      "formality",
      "length_control",
      "mask_profanity",
      "model",
      "source_language_code",
      "target_language_code",
      "text"
    ]
  }
  ```
</Expandable>

***

## writer\_update\_application\_graphs

Associate graphs

**Parameters:**

| Parameter        | Type      | Required | Default | Description                                                                                                                                                                                                             |
| ---------------- | --------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `application_id` | string    | Yes      | —       | The ID of the no-code agent to update.  Only no-code agents with chat capabilities can have associated Knowledge Graphs. No-code agents with text generation and research capabilities do not support Knowledge Graphs. |
| `graph_ids`      | string\[] | Yes      | —       | A list of Knowledge Graph IDs to associate with the application. Note that this will replace the existing list of Knowledge Graphs associated with the application, not add to it.                                      |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "application_id": {
        "type": "string",
        "description": "The ID of the no-code agent to update.  Only no-code agents with chat capabilities can have associated Knowledge Graphs. No-code agents with text generation and research capabilities do not support Knowledge Graphs."
      },
      "graph_ids": {
        "type": "array",
        "items": {
          "type": "string",
          "format": "uuid"
        },
        "description": "A list of Knowledge Graph IDs to associate with the application. Note that this will replace the existing list of Knowledge Graphs associated with the application, not add to it."
      }
    },
    "required": [
      "PCID",
      "application_id",
      "graph_ids"
    ]
  }
  ```
</Expandable>

***

## writer\_update\_graph

Update graph

**Parameters:**

| Parameter     | Type      | Required | Default | Description                                                                                                                                                                                        |
| ------------- | --------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `graph_id`    | string    | Yes      | —       | The unique identifier of the Knowledge Graph.                                                                                                                                                      |
| `description` | string    | No       | —       | A description of the Knowledge Graph (max 255 characters). Omitting this field leaves the description unchanged.                                                                                   |
| `name`        | string    | No       | —       | The name of the Knowledge Graph (max 255 characters). Omitting this field leaves the name unchanged.                                                                                               |
| `urls`        | object\[] | No       | —       | An array of web connector URLs to update for this Knowledge Graph. You can only connect URLs to Knowledge Graphs with the type `web`. To clear the list of URLs, set this field to an empty array. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "graph_id": {
        "type": "string",
        "description": "The unique identifier of the Knowledge Graph."
      },
      "description": {
        "type": "string",
        "description": "A description of the Knowledge Graph (max 255 characters). Omitting this field leaves the description unchanged."
      },
      "name": {
        "type": "string",
        "description": "The name of the Knowledge Graph (max 255 characters). Omitting this field leaves the name unchanged."
      },
      "urls": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "The URL to be processed by the web connector."
            },
            "exclude_urls": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "An array of URLs to exclude from processing within this web connector."
            },
            "type": {
              "type": "string",
              "enum": [
                "single_page",
                "sub_pages"
              ],
              "description": "The type of web connector processing for a URL."
            }
          },
          "required": [
            "url",
            "type"
          ]
        },
        "description": "An array of web connector URLs to update for this Knowledge Graph. You can only connect URLs to Knowledge Graphs with the type `web`. To clear the list of URLs, set this field to an empty array."
      }
    },
    "required": [
      "PCID",
      "graph_id"
    ]
  }
  ```
</Expandable>

***

## writer\_web\_search

Web search

**Parameters:**

| Parameter             | Type      | Required | Default | Description                                                                                                                                                                                                                                                                                          |
| --------------------- | --------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `chunks_per_source`   | integer   | No       | —       | Only applies when `search_depth` is `advanced`. Specifies how many text segments to extract from each source. Limited to 3 chunks maximum.                                                                                                                                                           |
| `country`             | string    | No       | —       | Localizes search results to a specific country. Only applies to general topic searches.                                                                                                                                                                                                              |
| `days`                | integer   | No       | —       | For news topic searches, specifies how many days of news coverage to include.                                                                                                                                                                                                                        |
| `exclude_domains`     | string\[] | No       | —       | Domains to exclude from the search. If unset, the search includes all domains.                                                                                                                                                                                                                       |
| `include_answer`      | boolean   | No       | —       | Whether to include a generated answer to the query in the response. If `false`, only search results are returned.                                                                                                                                                                                    |
| `include_domains`     | string\[] | No       | —       | Domains to include in the search. If unset, the search includes all domains.                                                                                                                                                                                                                         |
| `include_raw_content` | object    | No       | —       | Controls how raw content is included in search results:  - `text`: Returns plain text without formatting markup - `markdown`: Returns structured content with markdown formatting (headers, links, bold text) - `true`: Same as `markdown` - `false`: Raw content is not included (default if unset) |
| `max_results`         | integer   | No       | —       | Limits the number of search results returned. Cannot exceed 20 sources.                                                                                                                                                                                                                              |
| `query`               | string    | No       | —       | The search query.                                                                                                                                                                                                                                                                                    |
| `search_depth`        | string    | No       | —       | Controls search comprehensiveness:  - `basic`: Returns fewer but highly relevant results - `advanced`: Performs a deeper search with more results                                                                                                                                                    |
| `stream`              | boolean   | No       | —       | Enables streaming of search results as they become available.                                                                                                                                                                                                                                        |
| `time_range`          | string    | No       | —       | Filters results to content published within the specified time range back from the current date. For example, `week` or `w` returns results from the past 7 days.                                                                                                                                    |
| `topic`               | string    | No       | —       | The search topic category. Use `news` for current events and news articles, or `general` for broader web search.                                                                                                                                                                                     |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "chunks_per_source": {
        "type": "integer",
        "description": "Only applies when `search_depth` is `advanced`. Specifies how many text segments to extract from each source. Limited to 3 chunks maximum."
      },
      "country": {
        "type": "string",
        "description": "Localizes search results to a specific country. Only applies to general topic searches.",
        "enum": [
          "afghanistan",
          "albania",
          "algeria",
          "andorra",
          "angola",
          "argentina",
          "armenia",
          "australia",
          "austria",
          "azerbaijan",
          "bahamas",
          "bahrain",
          "bangladesh",
          "barbados",
          "belarus",
          "belgium",
          "belize",
          "benin",
          "bhutan",
          "bolivia",
          "bosnia and herzegovina",
          "botswana",
          "brazil",
          "brunei",
          "bulgaria",
          "burkina faso",
          "burundi",
          "cambodia",
          "cameroon",
          "canada",
          "cape verde",
          "central african republic",
          "chad",
          "chile",
          "china",
          "colombia",
          "comoros",
          "congo",
          "costa rica",
          "croatia",
          "cuba",
          "cyprus",
          "czech republic",
          "denmark",
          "djibouti",
          "dominican republic",
          "ecuador",
          "egypt",
          "el salvador",
          "equatorial guinea",
          "eritrea",
          "estonia",
          "ethiopia",
          "fiji",
          "finland",
          "france",
          "gabon",
          "gambia",
          "georgia",
          "germany",
          "ghana",
          "greece",
          "guatemala",
          "guinea",
          "haiti",
          "honduras",
          "hungary",
          "iceland",
          "india",
          "indonesia",
          "iran",
          "iraq",
          "ireland",
          "israel",
          "italy",
          "jamaica",
          "japan",
          "jordan",
          "kazakhstan",
          "kenya",
          "kuwait",
          "kyrgyzstan",
          "latvia",
          "lebanon",
          "lesotho",
          "liberia",
          "libya",
          "liechtenstein",
          "lithuania",
          "luxembourg",
          "madagascar",
          "malawi",
          "malaysia",
          "maldives",
          "mali",
          "malta",
          "mauritania",
          "mauritius",
          "mexico",
          "moldova",
          "monaco",
          "mongolia",
          "montenegro",
          "morocco",
          "mozambique",
          "myanmar",
          "namibia",
          "nepal",
          "netherlands",
          "new zealand",
          "nicaragua",
          "niger",
          "nigeria",
          "north korea",
          "north macedonia",
          "norway",
          "oman",
          "pakistan",
          "panama",
          "papua new guinea",
          "paraguay",
          "peru",
          "philippines",
          "poland",
          "portugal",
          "qatar",
          "romania",
          "russia",
          "rwanda",
          "saudi arabia",
          "senegal",
          "serbia",
          "singapore",
          "slovakia",
          "slovenia",
          "somalia",
          "south africa",
          "south korea",
          "south sudan",
          "spain",
          "sri lanka",
          "sudan",
          "sweden",
          "switzerland",
          "syria",
          "taiwan",
          "tajikistan",
          "tanzania",
          "thailand",
          "togo",
          "trinidad and tobago",
          "tunisia",
          "turkey",
          "turkmenistan",
          "uganda",
          "ukraine",
          "united arab emirates",
          "united kingdom",
          "united states",
          "uruguay",
          "uzbekistan",
          "venezuela",
          "vietnam",
          "yemen",
          "zambia",
          "zimbabwe"
        ]
      },
      "days": {
        "type": "integer",
        "description": "For news topic searches, specifies how many days of news coverage to include."
      },
      "exclude_domains": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Domains to exclude from the search. If unset, the search includes all domains."
      },
      "include_answer": {
        "type": "boolean",
        "description": "Whether to include a generated answer to the query in the response. If `false`, only search results are returned."
      },
      "include_domains": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Domains to include in the search. If unset, the search includes all domains."
      },
      "include_raw_content": {
        "description": "Controls how raw content is included in search results:  - `text`: Returns plain text without formatting markup - `markdown`: Returns structured content with markdown formatting (headers, links, bold text) - `true`: Same as `markdown` - `false`: Raw content is not included (default if unset)"
      },
      "max_results": {
        "type": "integer",
        "description": "Limits the number of search results returned. Cannot exceed 20 sources."
      },
      "query": {
        "type": "string",
        "description": "The search query."
      },
      "search_depth": {
        "type": "string",
        "description": "Controls search comprehensiveness:  - `basic`: Returns fewer but highly relevant results - `advanced`: Performs a deeper search with more results",
        "enum": [
          "basic",
          "advanced"
        ]
      },
      "stream": {
        "type": "boolean",
        "description": "Enables streaming of search results as they become available."
      },
      "time_range": {
        "type": "string",
        "description": "Filters results to content published within the specified time range back from the current date. For example, `week` or `w` returns results from the past 7 days.",
        "enum": [
          "day",
          "week",
          "month",
          "year",
          "d",
          "w",
          "m",
          "y"
        ]
      },
      "topic": {
        "type": "string",
        "description": "The search topic category. Use `news` for current events and news articles, or `general` for broader web search.",
        "enum": [
          "general",
          "news"
        ]
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>
