/** * Perplexity Node - Version 2 * Discriminator: resource=agent, operation=createResponse */ interface Credentials { perplexityApi: CredentialReference; } /** Create responses using the Agent API with third-party models, presets, tools, and structured outputs */ export type PerplexityV2AgentCreateResponseParams = { resource: 'agent'; operation: 'createResponse'; /** * The input text prompt to send to the agent */ input?: string | Expression | PlaceholderValue; /** * The model to use. Uses provider/model format (e.g. openai/gpt-5.2). Leave empty when using a preset. * @default {"mode":"list","value":""} */ model?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string }; /** * Preset name to use. Use preset OR model, not both. * @hint Use a preset OR a model, not both */ preset?: string | Expression | PlaceholderValue; /** * Whether to return only essential fields (ID, model, output text, citations) * @default false */ simplify?: boolean | Expression; /** * Options * @default {} */ options?: { /** System-level instructions for the agent */ instructions?: string | Expression | PlaceholderValue; /** ISO 639-1 language code for the response language preference */ languagePreference?: string | Expression | PlaceholderValue; /** The maximum number of tokens to generate in the response * @default 1024 */ maxOutputTokens?: number | Expression; /** Maximum number of agentic steps (1-10) * @default 5 */ maxSteps?: number | Expression; /** Comma-separated list of 1-5 model IDs to use as fallbacks */ modelsFallback?: string | Expression | PlaceholderValue; /** Reasoning configuration object (e.g. {"effort": "high"}) */ reasoning?: IDataObject | string | Expression; /** JSON schema for structured output. Set type to "json_schema" with a schema property. */ responseFormat?: IDataObject | string | Expression; /** Array of tool objects to make available to the agent */ tools?: IDataObject | string | Expression; }; requestOptions?: { /** Batching * @default {"batch":{}} */ batching?: { /** Batching */ batch?: { /** Input will be split in batches to throttle requests. -1 for disabled. 0 will be treated as 1. * @default 50 */ batchSize?: number | Expression; /** Time (in milliseconds) between each batch of requests. 0 for disabled. * @default 1000 */ batchInterval?: number | Expression; }; }; /** Whether to accept the response even if SSL certificate validation is not possible * @default false */ allowUnauthorizedCerts?: boolean; /** HTTP proxy to use. If authentication is required it can be defined as follow: http://username:password@myproxy:3128 */ proxy?: string | Expression | PlaceholderValue; /** Time in ms to wait for the server to send response headers (and start the response body) before aborting the request * @default 10000 */ timeout?: number | Expression; }; }; export type PerplexityV2AgentCreateResponseNode = { type: 'n8n-nodes-base.perplexity'; version: 2; credentials?: Credentials; config: NodeConfig; };