Documentación ›
Cuenta e IA › Cargar datos de entrenamiento
POST
Cargar datos de entrenamiento
POSThttps://app.sendapp.ai/api/upload_training
Carga datos de entrenamiento para tu modelo de IA: un archivo (PDF o TXT vía URL), una página web para hacer scraping o un sitemap.
Parámetros
apikey
obligatorio
Tu API Key.
token
obligatorio
Token de la cuenta.
media_url
opcional
URL del archivo a procesar (PDF o TXT).
url
opcional
URL de la página web a scrapear.
sitemap
opcional
URL del sitemap a procesar.
Solicitud
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());Respuesta (200 OK)
{
"status": "pending",
"message": "Your request has been accepted and will be processed in the background.",
"token": "trn_a1b2c3d4e5f6"
}Error
{
"status": "error",
"message": "Training is already pending or in progress."
}