POST
/
v4
/
applications
/
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.applications.process({
    edges: [{ from_field: 'from_field', from_node: 'from_node', to_field: 'to_field', to_node: 'to_node' }],
    inputs: { foo: { foo: 'bar' } },
    nodes: [{ id: 'id', application_node_schema_id: 'text_input_schema' }],
    version: 'V0',
  });

  console.log(response);
}

main();
"<any>"

Authorizations

x-api-key
string
header
required

Body

application/json
inputs
object
required

Input data for the application. You must provide inputs for each input node

nodes
object[]
required

List of nodes in the application graph

edges
object[]
required

List of edges in the application graph

version
enum<string>
required

Version of the application schema

Available options:
V0
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.