POST
/
v4
/
applications
/
{application_variant_id}
/
threads
/
{thread_id}
/
process
import SGPClient from 'sgp';

const client = new SGPClient({
  apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const response = await client.applicationThreads.process('application_variant_id', 'thread_id', {
    inputs: { foo: 'bar' },
  });

  console.log(response);
}

main();
"<any>"

Authorizations

x-api-key
string
header
required

Headers

x-selected-account-id
string | null

Path Parameters

application_variant_id
string
required
thread_id
string
required

Body

application/json
inputs
object
required

Input data for the application. For agents service variants, you must provide inputs as a mapping from {input_name: input_value}. For V0 variants, you must specify the node your input should be passed to, structuring your input as {node_id: {input_name: input_value}}.

history
object[]

History of the application

overrides
object

Optional overrides for the application

stream
boolean
default:
false

Control to have streaming of the endpoint. If the last node before the output is a completion node, you can set this to true to get the output as soon as the completion node has a token

operation_metadata
object

Arbitrary user-defined metadata that can be attached to the process operations and will be registered in the interaction.

Response

200
application/json
Successful Response

The response is of type any.