curl --request POST \
--url https://api.aisa.one/apis/v1/parallel/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"messages": [
"<unknown>"
]
}
'import requests
url = "https://api.aisa.one/apis/v1/parallel/chat/completions"
payload = { "messages": ["<unknown>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({messages: ['<unknown>']})
};
fetch('https://api.aisa.one/apis/v1/parallel/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/parallel/chat/completions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'messages' => [
'<unknown>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/parallel/chat/completions"
payload := strings.NewReader("{\n \"messages\": [\n \"<unknown>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/parallel/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"messages\": [\n \"<unknown>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/parallel/chat/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"messages\": [\n \"<unknown>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"choices": [
{
"delta": {
"content": "<string>",
"function_call": {
"arguments": "<string>",
"name": "<string>"
},
"refusal": "<string>",
"role": "developer",
"tool_calls": [
{
"index": 123,
"function": {
"arguments": "<string>",
"name": "<string>"
},
"id": "<string>",
"type": "function"
}
]
},
"index": 123,
"finish_reason": "stop",
"logprobs": {
"content": [
{
"logprob": 123,
"token": "<string>",
"top_logprobs": [
{
"logprob": 123,
"token": "<string>",
"bytes": [
123
]
}
],
"bytes": [
123
]
}
],
"refusal": [
{
"logprob": 123,
"token": "<string>",
"top_logprobs": [
{
"logprob": 123,
"token": "<string>",
"bytes": [
123
]
}
],
"bytes": [
123
]
}
]
}
}
],
"created": 123,
"id": "<string>",
"model": "<string>",
"object": "chat.completion",
"basis": [],
"interaction_id": "<string>",
"moderation": {
"input": {
"model": "<string>",
"results": [
{
"categories": {},
"category_applied_input_types": {},
"category_scores": {},
"flagged": true,
"model": "<string>",
"type": "moderation_result"
}
],
"type": "moderation_results"
},
"output": {
"model": "<string>",
"results": [
{
"categories": {},
"category_applied_input_types": {},
"category_scores": {},
"flagged": true,
"model": "<string>",
"type": "moderation_result"
}
],
"type": "moderation_results"
}
},
"service_tier": "auto",
"system_fingerprint": "<string>",
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123,
"completion_tokens_details": {
"accepted_prediction_tokens": 123,
"audio_tokens": 123,
"reasoning_tokens": 123,
"rejected_prediction_tokens": 123
},
"prompt_tokens_details": {
"audio_tokens": 123,
"cached_tokens": 123
}
}
}Chat Completions
curl --request POST \
--url https://api.aisa.one/apis/v1/parallel/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"messages": [
"<unknown>"
]
}
'import requests
url = "https://api.aisa.one/apis/v1/parallel/chat/completions"
payload = { "messages": ["<unknown>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({messages: ['<unknown>']})
};
fetch('https://api.aisa.one/apis/v1/parallel/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/parallel/chat/completions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'messages' => [
'<unknown>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/parallel/chat/completions"
payload := strings.NewReader("{\n \"messages\": [\n \"<unknown>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/parallel/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"messages\": [\n \"<unknown>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/parallel/chat/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"messages\": [\n \"<unknown>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"choices": [
{
"delta": {
"content": "<string>",
"function_call": {
"arguments": "<string>",
"name": "<string>"
},
"refusal": "<string>",
"role": "developer",
"tool_calls": [
{
"index": 123,
"function": {
"arguments": "<string>",
"name": "<string>"
},
"id": "<string>",
"type": "function"
}
]
},
"index": 123,
"finish_reason": "stop",
"logprobs": {
"content": [
{
"logprob": 123,
"token": "<string>",
"top_logprobs": [
{
"logprob": 123,
"token": "<string>",
"bytes": [
123
]
}
],
"bytes": [
123
]
}
],
"refusal": [
{
"logprob": 123,
"token": "<string>",
"top_logprobs": [
{
"logprob": 123,
"token": "<string>",
"bytes": [
123
]
}
],
"bytes": [
123
]
}
]
}
}
],
"created": 123,
"id": "<string>",
"model": "<string>",
"object": "chat.completion",
"basis": [],
"interaction_id": "<string>",
"moderation": {
"input": {
"model": "<string>",
"results": [
{
"categories": {},
"category_applied_input_types": {},
"category_scores": {},
"flagged": true,
"model": "<string>",
"type": "moderation_result"
}
],
"type": "moderation_results"
},
"output": {
"model": "<string>",
"results": [
{
"categories": {},
"category_applied_input_types": {},
"category_scores": {},
"flagged": true,
"model": "<string>",
"type": "moderation_result"
}
],
"type": "moderation_results"
}
},
"service_tier": "auto",
"system_fingerprint": "<string>",
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123,
"completion_tokens_details": {
"accepted_prediction_tokens": 123,
"audio_tokens": 123,
"reasoning_tokens": 123,
"rejected_prediction_tokens": 123
},
"prompt_tokens_details": {
"audio_tokens": 123,
"cached_tokens": 123
}
}
}Request contract
- Method and path: POST /apis/v1/parallel/chat/completions
- Availability: enabled
- Request URL template: https://api.aisa.one/apis/v1/parallel/chat/completions
- Runtime facts: 5d413ff65ac53e696e28c5a12c4dbbb99e94b7667cbafba2e2c6b9da9156a731
{
"operationId": "post_parallel_ai_apis_v1_parallel_chat_completions",
"method": "POST",
"path": "/apis/v1/parallel/chat/completions",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"description": "Request for the chat completions endpoint.\n\nNote that all parameters except for `model`, `stream`, and `response_format`\nare ignored.",
"properties": {
"frequency_penalty": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "The frequency penalty to use for chat completions. Unsupported.",
"title": "Frequency Penalty"
},
"max_tokens": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"description": "The maximum number of tokens to generate. Unsupported.",
"title": "Max Tokens"
},
"messages": {
"items": {},
"minItems": 1,
"type": "array"
},
"model": {
"enum": [
"base",
"core",
"lite",
"speed"
],
"type": "string"
},
"n": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"description": "The number of chat completions to generate. Unsupported.",
"title": "N"
},
"presence_penalty": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "The presence penalty to use for chat completions. Unsupported.",
"title": "Presence Penalty"
},
"previous_interaction_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Interaction ID from a previous chat completion to use as context.",
"title": "Previous Interaction Id"
},
"response_format": {
"anyOf": [
{
"description": "Default response format. Used to generate text responses.",
"properties": {
"type": {
"const": "text",
"title": "Type",
"type": "string"
}
},
"required": [
"type"
],
"title": "ResponseFormatText",
"type": "object"
},
{
"description": "JSON Schema response format.\n\nUsed to generate structured JSON responses.\nLearn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).",
"properties": {
"json_schema": {
"description": "Structured Outputs configuration options, including a JSON Schema.",
"properties": {
"description": {
"title": "Description",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"schema": {
"additionalProperties": false,
"title": "Schema",
"type": "object"
},
"strict": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Strict"
}
},
"required": [
"name"
],
"title": "JSONSchema",
"type": "object"
},
"type": {
"const": "json_schema",
"title": "Type",
"type": "string"
}
},
"required": [
"json_schema",
"type"
],
"title": "ResponseFormatJSONSchema",
"type": "object"
},
{
"description": "JSON object response format.\n\nAn older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.",
"properties": {
"type": {
"const": "json_object",
"title": "Type",
"type": "string"
}
},
"required": [
"type"
],
"title": "ResponseFormatJSONObject",
"type": "object"
},
{
"type": "null"
}
],
"description": "The response format to use for chat completions. OpenAI compatible.",
"title": "Response Format"
},
"stream": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Whether to stream the chat completions.",
"title": "Stream"
},
"temperature": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "The temperature to use for chat completions. Unsupported.",
"title": "Temperature"
},
"top_p": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "The top p to use for chat completions. Unsupported.",
"title": "Top P"
}
},
"required": [
"messages",
"model"
],
"title": "ChatCompletionRequest",
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"x-aisa-pricing": {
"cost_contract": "request_formula",
"customer_multiplier": 1.0,
"customer_pricing": "provider_cost_multiplier",
"default_request_estimate_usd": 0.01,
"estimate_source": "profile_seed",
"evidence_source": "request_snapshot"
},
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Usage-based billing; Default request estimate: $0.01 USD (not a fixed price). Account-specific pricing and final settlement may differ. Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.- Default request reference estimate (USD): 0.01
- Cost contract: request_formula
- Published reference multiplier: 1.0
- Settlement evidence source: request_snapshot
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Request for the chat completions endpoint.
Note that all parameters except for model, stream, and response_format
are ignored.
1base, core, lite, speed The frequency penalty to use for chat completions. Unsupported.
The maximum number of tokens to generate. Unsupported.
The number of chat completions to generate. Unsupported.
The presence penalty to use for chat completions. Unsupported.
Interaction ID from a previous chat completion to use as context.
Default response format. Used to generate text responses.
- ResponseFormatText
- ResponseFormatJSONSchema
- ResponseFormatJSONObject
Show child attributes
Show child attributes
Whether to stream the chat completions.
The temperature to use for chat completions. Unsupported.
The top p to use for chat completions. Unsupported.
Response
Returns a ChatCompletion object for non-streaming requests (application/json), or a stream of ChatCompletionResponseChunk objects for streaming requests (text/event-stream) when stream=true is set in the request.
Chat completion response.
Show child attributes
Show child attributes
The id of the chat completion.
"chat.completion"Basis for the chat completion, including citations and reasoning supporting the output.
Show child attributes
Show child attributes
Identifier for this interaction. Pass as previous_interaction_id for follow-ups.
Moderation results for the request input and generated output, if moderated completions were requested.
Show child attributes
Show child attributes
auto, default, flex, scale, priority Usage statistics for the completion request.
Show child attributes
Show child attributes