Documentazione ›
Account e AI › Carica dati di training
POST
Carica dati di training
POSThttps://app.sendapp.ai/api/upload_training
Carica dati di training per il tuo modello AI: un file (PDF o TXT via URL), una pagina web da scrapare, oppure una sitemap.
Parametri
apikey
obbligatorio
La tua API Key.
token
obbligatorio
Token dell'account.
media_url
opzionale
URL del file da processare (PDF o TXT).
url
opzionale
URL della pagina web da scrapare.
sitemap
opzionale
URL della sitemap da processare.
Richiesta
curl -X POST 'https://app.sendapp.ai/api/upload_training' \
-H 'Content-Type: application/json' \
-d '{
"apikey": "YOUR_API_KEY",
"token": "YOUR_ACCOUNT_TOKEN",
"url": "https://example.com/faq"
}'<?php
$ch = curl_init('https://app.sendapp.ai/api/upload_training');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'apikey' => 'YOUR_API_KEY',
'token' => 'YOUR_ACCOUNT_TOKEN',
'url' => 'https://example.com/faq',
]),
]);
echo curl_exec($ch);
curl_close($ch);const res = await fetch('https://app.sendapp.ai/api/upload_training', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
apikey: 'YOUR_API_KEY',
token: 'YOUR_ACCOUNT_TOKEN',
url: 'https://example.com/faq'
})
});
console.log(await res.json());Risposta (200 OK)
{
"status": "pending",
"message": "Your request has been accepted and will be processed in the background.",
"token": "trn_a1b2c3d4e5f6"
}Errore
{
"status": "error",
"message": "Training is already pending or in progress."
}