Skip to main content

Using AON with HTTP

Authentication

All API requests must be authenticated. Include authenticated in header with all requests.

You can choose either API key or JWT token for authentication.

For API Key

header = {
apikey:"your api key"
}

For JWT Token

header = {
Authorization:"Bearer your jwt token"
}

Create a prediction

For API Key

When using API key for authentication, the base path of the HTTP request is 'api'.

POST https://api.aonet.ai/api/v1/predictions/ai/bark

Example cURL request:

curl -X POST \
https://api.aigic.ai/api/v1/predictions/ai/bark \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'apikey: <your api key>' \
-d '{
"input":{
"prompt": "Hello, my name is Suno. And, uh — and I like pizza. [laughs] But I also have other interests such as playing tic tac toe."
}
}'

For JWT Token

When using JWT Tokwn for authentication, the base path of the HTTP request is 'jwt'.

POST https://api.aonet.ai/jwt/v1/predictions/ai/bark

Example cURL request:

curl -X POST \
https://api.aigic.ai/jwt/v1/predictions/ai/bark \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your jwt token>' \
-d '{
"input":{
"prompt": "Hello, my name is Suno. And, uh — and I like pizza. [laughs] But I also have other interests such as playing tic tac toe."
}
}'