Requests to the SparkAI service can be made with one simple REST call. For users with an established program, all that is required in a new engagement request is a pointer to the content.
Polling flow
- (Optional) Upload an image file to the SparkAI image server by making a
POSTrequest to the/v1/imageroute, storing the location URL for use in future API calls. - Make an API call to
POSTto theengagementpath, supplying either aprogram_nameorinstructions, and acontent_location. This API call will return atoken. - Periodically poll the
engagementresource using the returnedengagementfor status.
Webhook flow
- (Optional) Upload an image file to the SparkAI image server by making a
POSTrequest to the/v1/imageroute, storing the location URL for use in future API calls. - Make an API call to
POSTto theengagementpath, supplying either aprogram_nameorinstructions, and acontent_location. This API call will return atoken. - When the
engagementchanges status, the SparkAI service willPOSTtheresolutionto a provided URL.
