Generate content using a Gemini-compatible AIsa model
curl --request POST \
--url https://api.aisa.one/v1beta/models/{model}:generateContent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contents": [
{
"parts": [
{
"inline_data": {},
"text": "<string>",
"thoughtSignature": "<string>"
}
]
}
]
}
'import requests
url = "https://api.aisa.one/v1beta/models/{model}:generateContent"
payload = { "contents": [{ "parts": [
{
"inline_data": {},
"text": "<string>",
"thoughtSignature": "<string>"
}
] }] }
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({
contents: [{parts: [{inline_data: {}, text: '<string>', thoughtSignature: '<string>'}]}]
})
};
fetch('https://api.aisa.one/v1beta/models/{model}:generateContent', 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/v1beta/models/{model}:generateContent",
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([
'contents' => [
[
'parts' => [
[
'inline_data' => [
],
'text' => '<string>',
'thoughtSignature' => '<string>'
]
]
]
]
]),
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/v1beta/models/{model}:generateContent"
payload := strings.NewReader("{\n \"contents\": [\n {\n \"parts\": [\n {\n \"inline_data\": {},\n \"text\": \"<string>\",\n \"thoughtSignature\": \"<string>\"\n }\n ]\n }\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/v1beta/models/{model}:generateContent")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contents\": [\n {\n \"parts\": [\n {\n \"inline_data\": {},\n \"text\": \"<string>\",\n \"thoughtSignature\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/v1beta/models/{model}:generateContent")
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 \"contents\": [\n {\n \"parts\": [\n {\n \"inline_data\": {},\n \"text\": \"<string>\",\n \"thoughtSignature\": \"<string>\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"candidates": [
{
"content": {
"parts": [
{
"inline_data": {},
"text": "<string>",
"thoughtSignature": "<string>"
}
],
"role": "user"
},
"finishReason": "<string>",
"index": 123,
"safetyRatings": [
{}
]
}
],
"modelVersion": "<string>",
"responseId": "<string>",
"usageMetadata": {
"candidatesTokenCount": 123,
"promptTokenCount": 123,
"totalTokenCount": 123
}
}{
"error": {
"code": 123,
"message": "<string>",
"status": "<string>"
}
}Chat API
Gemini Generate Content
Generate content using a Gemini-compatible AIsa model
POST
https://api.aisa.one/v1beta
/
models
/
{model}
:generateContent
Generate content using a Gemini-compatible AIsa model
curl --request POST \
--url https://api.aisa.one/v1beta/models/{model}:generateContent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contents": [
{
"parts": [
{
"inline_data": {},
"text": "<string>",
"thoughtSignature": "<string>"
}
]
}
]
}
'import requests
url = "https://api.aisa.one/v1beta/models/{model}:generateContent"
payload = { "contents": [{ "parts": [
{
"inline_data": {},
"text": "<string>",
"thoughtSignature": "<string>"
}
] }] }
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({
contents: [{parts: [{inline_data: {}, text: '<string>', thoughtSignature: '<string>'}]}]
})
};
fetch('https://api.aisa.one/v1beta/models/{model}:generateContent', 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/v1beta/models/{model}:generateContent",
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([
'contents' => [
[
'parts' => [
[
'inline_data' => [
],
'text' => '<string>',
'thoughtSignature' => '<string>'
]
]
]
]
]),
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/v1beta/models/{model}:generateContent"
payload := strings.NewReader("{\n \"contents\": [\n {\n \"parts\": [\n {\n \"inline_data\": {},\n \"text\": \"<string>\",\n \"thoughtSignature\": \"<string>\"\n }\n ]\n }\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/v1beta/models/{model}:generateContent")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contents\": [\n {\n \"parts\": [\n {\n \"inline_data\": {},\n \"text\": \"<string>\",\n \"thoughtSignature\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/v1beta/models/{model}:generateContent")
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 \"contents\": [\n {\n \"parts\": [\n {\n \"inline_data\": {},\n \"text\": \"<string>\",\n \"thoughtSignature\": \"<string>\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"candidates": [
{
"content": {
"parts": [
{
"inline_data": {},
"text": "<string>",
"thoughtSignature": "<string>"
}
],
"role": "user"
},
"finishReason": "<string>",
"index": 123,
"safetyRatings": [
{}
]
}
],
"modelVersion": "<string>",
"responseId": "<string>",
"usageMetadata": {
"candidatesTokenCount": 123,
"promptTokenCount": 123,
"totalTokenCount": 123
}
}{
"error": {
"code": 123,
"message": "<string>",
"status": "<string>"
}
}Request contract
- Method and path: POST /models/{model}:generateContent
- Request URL template:
https://api.aisa.one/v1beta/models/{model}:generateContent - model: path; required
{
"operationId": "generateContent",
"method": "POST",
"path": "/models/{model}:generateContent",
"servers": [
{
"description": "Gemini-compatible API base URL",
"url": "https://api.aisa.one/v1beta"
}
],
"parameters": [
{
"description": "The AIsa model ID to use, for example: gemini-3.5-flash.",
"in": "path",
"name": "model",
"required": true,
"schema": {
"example": "gemini-3.5-flash",
"type": "string"
}
}
],
"security": [
{
"BearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenerateContentRequest"
}
}
},
"required": true
},
"components": {
"schemas": {
"GenerateContentRequest": {
"properties": {
"cachedContent": {
"description": "Optional cached content ID",
"type": "string"
},
"contents": {
"description": "Content of the conversation, required",
"items": {
"$ref": "#/components/schemas/Content"
},
"type": "array"
},
"generationConfig": {
"$ref": "#/components/schemas/GenerationConfig"
},
"safetySettings": {
"items": {
"$ref": "#/components/schemas/SafetySetting"
},
"type": "array"
},
"systemInstruction": {
"$ref": "#/components/schemas/Content"
},
"toolConfig": {
"description": "Optional tool configuration",
"type": "object"
},
"tools": {
"description": "Optional tools the model can use",
"items": {
"$ref": "#/components/schemas/Tool"
},
"type": "array"
}
},
"required": [
"contents"
],
"type": "object"
},
"Content": {
"additionalProperties": true,
"properties": {
"parts": {
"items": {
"$ref": "#/components/schemas/Part"
},
"type": "array"
},
"role": {
"enum": [
"user",
"model",
"system",
"assistant"
],
"type": "string"
}
},
"type": "object"
},
"Part": {
"additionalProperties": true,
"properties": {
"inline_data": {
"description": "Inline binary data for multimodal content.",
"type": "object"
},
"text": {
"description": "Generated or input text content.",
"type": "string"
},
"thoughtSignature": {
"description": "Provider-generated thought signature metadata.",
"type": "string"
}
},
"type": "object"
},
"GenerationConfig": {
"type": "object"
},
"SafetySetting": {
"type": "object"
},
"Tool": {
"type": "object"
}
},
"securitySchemes": {
"BearerAuth": {
"bearerFormat": "API Key",
"scheme": "bearer",
"type": "http"
}
}
}
}
Authorizations
Path Parameters
Body
application/json