POST
{base_url}
/
async

Overview

Create and enqueue an asynchronous request.

Asynchronous requests will be queued. If the service is available at the moment, it will soon be processed. Otherwise, if the service is currently scaled down to zero, the request will get processed after the service becomes available.

The result can be queried in output-fetching API.

Interaction code example

Request

Authorization

You must provide a token in Authorization header with Bearer scheme, as:

Authorization: Bearer <token>

The token can be found in the web UI (in service overview’s Request dialog).

Path parameters

base_url
string
required

Base URL for your service. This value can be found in the web UI (in service overview’s Request dialog).

Typical value: https://serve-api.dev2.vssl.ai/api/v1/services/<slug>

JSON body parameters

data
any
required

JSON data to send as body in the request to your service.

method
any
default: "POST"

Method to use in request. If unspecified, POST will be used.

path
any
default: "/"

Path to use in request. If unspecified, / (root path) will be used.

Response

On successful operation, this API will respond with HTTP status code 201 (Created).

id
string

ID of the newly created request. It can be used to fetch its status and output.

This is a lowercase-alphanumeric string with length 1 to 16.

Example: 98nlux8b0eu6