v1 — REST API

AgentVault API

Chat, Embeddings y Transcripcion en una sola API. Compatible con OpenAI SDK. Tus datos nunca salen de nuestra infra.

Autenticacion

Todas las peticiones requieren una API key en el header. Obten tu key desde el Dashboard → API Keys.

# Agrega este header a todas las peticiones:
X-API-Key: tu_api_key_aqui

# O usa Authorization Bearer:
Authorization: Bearer tu_api_key_aqui

Base URL: https://agentesia.lomerezco.com/api

Chat Completions

POST /v1/chat
Envia un mensaje y recibe una respuesta del modelo IA. Puedes especificar un agente para contexto especializado.

Parametros

CampoTipoDescripcion
message requeridostringEl mensaje del usuario
agent_slugstringSlug del agente (ej: "logo-creator"). Agrega contexto especializado.
conversation_idstringID de conversacion para mantener contexto entre mensajes.

Ejemplo

curl -X POST https://agentesia.lomerezco.com/api/v1/chat \
  -H "X-API-Key: tu_key" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Crea un logo minimalista para una cafeteria tech",
    "agent_slug": "logo-creator"
  }'
import requests

resp = requests.post(
    "https://agentesia.lomerezco.com/api/v1/chat",
    headers={"X-API-Key": "tu_key"},
    json={
        "message": "Crea un logo minimalista para una cafeteria tech",
        "agent_slug": "logo-creator"
    }
)
print(resp.json()["response"])
const res = await fetch("https://agentesia.lomerezco.com/api/v1/chat", {
  method: "POST",
  headers: {
    "X-API-Key": "tu_key",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    message: "Crea un logo minimalista para una cafeteria tech",
    agent_slug: "logo-creator"
  })
});
const data = await res.json();
console.log(data.response);
$response = file_get_contents('https://agentesia.lomerezco.com/api/v1/chat', false,
  stream_context_create(['http' => [
    'method' => 'POST',
    'header' => "X-API-Key: tu_key\r\nContent-Type: application/json",
    'content' => json_encode([
      'message' => 'Crea un logo minimalista para una cafeteria tech',
      'agent_slug' => 'logo-creator'
    ])
  ]])
);
$data = json_decode($response, true);
echo $data['response'];

Embeddings

POST /v1/embeddings
Vectoriza texto para RAG, busqueda semantica y clasificacion. Devuelve vectores de 768 dimensiones.
CampoTipoDescripcion
input requeridostring | string[]Texto(s) a vectorizar
modelstringDefault: nomic-embed-text
curl -X POST https://agentesia.lomerezco.com/api/v1/embeddings \
  -H "X-API-Key: tu_key" \
  -H "Content-Type: application/json" \
  -d '{"input": "Texto para vectorizar"}'

# Respuesta: { "data": [{ "embedding": [0.013, 0.064, ...], "index": 0 }], "model": "nomic-embed-text" }
import requests

resp = requests.post(
    "https://agentesia.lomerezco.com/api/v1/embeddings",
    headers={"X-API-Key": "tu_key"},
    json={"input": ["texto 1", "texto 2"]}
)
vectors = [d["embedding"] for d in resp.json()["data"]]
const res = await fetch("https://agentesia.lomerezco.com/api/v1/embeddings", {
  method: "POST",
  headers: { "X-API-Key": "tu_key", "Content-Type": "application/json" },
  body: JSON.stringify({ input: "Texto para vectorizar" })
});
const { data } = await res.json();
console.log(`Dimensions: ${data[0].embedding.length}`); // 768

Transcripcion (Whisper)

POST /v1/transcribe
Convierte audio a texto. Soporta MP3, WAV, M4A, OGG, WEBM, FLAC. Maximo 50MB.
CampoTipoDescripcion
file requeridofile (multipart)Archivo de audio
languagestringIdioma: es, en, fr (default: es)
modelstringModelo Whisper: tiny, base, small, medium (default: base)
curl -X POST https://agentesia.lomerezco.com/api/v1/transcribe \
  -H "X-API-Key: tu_key" \
  -F "file=@audio.mp3" \
  -F "language=es"

# Respuesta: { "text": "Hola mundo...", "segments": [...], "language": "es" }
import requests

with open("audio.mp3", "rb") as f:
    resp = requests.post(
        "https://agentesia.lomerezco.com/api/v1/transcribe",
        headers={"X-API-Key": "tu_key"},
        files={"file": f},
        data={"language": "es"}
    )
print(resp.json()["text"])

Listar Agentes

GET /agents
Lista todos los agentes disponibles. Filtra por categoria o tier.
Query ParamTipoDescripcion
categorystringFiltrar: sales, design, robotics, marketing, engineering, etc.
tierstringfree o pro
langstringes, en, fr
curl https://agentesia.lomerezco.com/api/agents?category=design&lang=es

Limites y Errores

CodigoSignificado
200OK
400Parametros invalidos
401API key invalida o faltante
402Sin creditos o limite alcanzado
429Rate limit (200 req/15min por default)
500Error del servidor

Planes

PlanPrecioChat tokensEmbeddingsWhisperAPI
Free$050K/mes10K/mes5 minSolo panel
Dev$9/mes500K/mes100K/mes60 minREST API
Startup$29/mes2M/mes500K/mes5hAPI + Widget
Business$99/mes10M/mes2M/mes16h+Todo
Unlimited$299/mes50M/mes10M/mes83h+Todo + SLA