Rest API
Ai
Generation flash card from topic
Example generation flash card with AI
AuthorizationBearer <token>
In: header
topicstring
numberCards?number
Default
5
Range
5 <= value <= 50
language?string
Default
"auto"
Response Body
200
default
curl -X POST "https://demo.expostarter.com/api/ai/generate" \
-H "Content-Type: application/json" \
-d '{
"topic": "string"
}'
const body = JSON.stringify({
"topic": "string"
})
fetch("https://demo.expostarter.com/api/ai/generate", {
body
})
package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://demo.expostarter.com/api/ai/generate"
body := strings.NewReader(`{
"topic": "string"
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "https://demo.expostarter.com/api/ai/generate"
body = {
"topic": "string"
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)
{
"title": "string",
"description": "string",
"category": "string",
"language": "string",
"cards": [
{
"question": "string",
"answer": "string"
}
]
}
{
"message": "string",
"code": "string",
"issues": [
{
"message": "string"
}
]
}