/writer | Type: Application | PCID required: Yes
Tools
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. |
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 ({{}}). For example, Describe the difference between the image {{image_1}} and the image {{image_2}}. |
variables | any[] | Yes | — | variables |
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 for more information about the maximum number of tokens for each model. |
messages | any[] | 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 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 is supported for structured responses. If you specify json_schema, you must also provide a json_schema object. |
stop | object | 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, {"type": "function", "function": {"name": "get_current_weather"}} requires the model to call the get_current_weather function, regardless of the prompt. |
tools | any[] | 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 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. |
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 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 | object | 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. |
writer_comprehend_medical
Medical comprehend Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
content | string | Yes | — | The text to analyze. |
response_type | string | Yes | — | response_type |
writer_context_aware_splitting
Context-aware text splitting Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
strategy | string | Yes | — | strategy |
text | string | Yes | — | The text to split into chunks. |
writer_convert_text_to_graph
Text-to-graph Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
text | string | Yes | — | The text to convert into a graph structure. Maximum of 35,000 words. |
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. |
writer_delete_graph
Delete graph Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
graph_id | string | Yes | — | The unique identifier of the Knowledge Graph. |
writer_detect_ai_content
AI detection Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
input | string | Yes | — | The content to determine if it is AI- or human-generated. Content must have at least 350 characters. |
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. |
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. |
writer_gateway_delete_file
Delete file Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
file_id | string | Yes | — | The unique identifier of the file. |
writer_gateway_download_file
Download file Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
file_id | string | Yes | — | The unique identifier of the file. |
writer_gateway_get_file
Retrieve file Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
file_id | string | Yes | — | The unique identifier of the file. |
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 | string | 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. |
writer_gateway_retry_failed_files
Retry failed files Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
file_ids | any[] | Yes | — | The unique identifier of the files to retry. |
writer_gateway_upload_file
Upload file Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Content-Disposition | string | Yes | — | Disposition type of the file. Use attachment with the filename parameter, for example: attachment; filename=example.pdf. |
Content-Type | string | Yes | — | MIME type of the file being uploaded. Supports txt, doc, docx, ppt, pptx, jpg, png, eml, html, pdf, srt, csv, xls, xlsx, mp3, and mp4. |
Content-Length | integer | Yes | — | 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 | — | The raw file content to upload. |
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 | any[] | Yes | — | A list of input objects to generate content for. |
writer_generate_content
Generate from application Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
application_id | string | Yes | — | The unique identifier of a no-code agent in AI Studio. |
inputs | any[] | Yes | — | inputs |
stream | boolean | No | — | Indicates whether the response should be streamed. Currently only supported for research assistant applications. |
writer_get_application
Application details Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
application_id | string | Yes | — | Unique identifier of the application to retrieve. |
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. |
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. |
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. |
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. |
writer_models
List modelswriter_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. |
writer_question
Question Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
graph_ids | any[] | 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. |
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. |
writer_retry_application_job
Retry job execution Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
job_id | string | Yes | — | The ID of the job to retry. |
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. 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. 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. 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 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. For example, Mexican Spanish is es-MX. See the list of supported languages and language codes. |
target_language_code | string | Yes | — | The ISO-639-1 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. For example, Mexican Spanish is es-MX. See the list of supported languages and language codes. |
text | string | Yes | — | The text to translate. Maximum of 100,000 words. |
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 | any[] | 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. |
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 | any[] | 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. |
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 | any[] | 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 | any[] | 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. |

