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

  1. (Optional) Upload an image file to the SparkAI image server by making a POST request to the /v1/image route, storing the location URL for use in future API calls.
  2. Make an API call to POST to the engagement path, supplying either a program_name or instructions, and a content_location. This API call will return a token.
  3. Periodically poll the engagement resource using the returned engagement for status.

Webhook flow

  1. (Optional) Upload an image file to the SparkAI image server by making a POST request to the /v1/image route, storing the location URL for use in future API calls.
  2. Make an API call to POST to the engagement path, supplying either a program_name or instructions, and a content_location. This API call will return a token.
  3. When the engagement changes status, the SparkAI service will POST the resolution to a provided URL.