Skip to main content

Large REST responses

Some deployments generate a lot of data and it can be more performant to store that data in S3 instead of processing it through the API. In these cases, use the links response format. The links response format temporarily stores the results of your inference request in S3 and returns a link to the results in the REST response.

Set the response_format: "links" parameter of get_inference:

import modelbit

modelbit.get_inference(..., response_format: "links")

Responses will contain a link to the results:

{ "data": "https://.../abc123.json?..." }

The response URLs are signed and expire after 1 hour.