LLM · Imágenes · Voz · Visión — un solo endpoint, entrada y salida limpias. Sin dependencia de OpenAI.
Endpoint base: https://i-a.mx — Autenticación: Authorization: Bearer <api_key>
Entrada y salida limpias. Sin formato OpenAI.
curl -X POST https://i-a.mx/v1/ask \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"ask": "Explica la fotosíntesis en 2 frases",
"mode": "expert"
}'const res = await fetch('https://i-a.mx/v1/ask', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
ask: "Explica la fotosíntesis en 2 frases",
mode: "expert"
})
});
const data = await res.json();
console.log(data.answer); // texto limpio
console.log(data.usage); // { tokens_in, tokens_out, cost }import requests
res = requests.post(
"https://i-a.mx/v1/ask",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"ask": "Explica la fotosíntesis en 2 frases", "mode": "expert"}
)
data = res.json()
print(data["answer"])
print(data["usage"])// Request
{ "ask": "...", "mode": "expert" }
// Response (LLM)
{ "answer": "Texto generado...", "done": true,
"model": "deepseek-v4-pro",
"usage": { "tokens_in": 15, "tokens_out": 120, "cost": 0.00027 } }// Request
{ "ask": "...", "mode": "expert", "stream": true }
// Response — SSE (text/event-stream)
data: {"answer":"tok1","done":false}
data: {"answer":" tok2","done":false}
data: {"answer":"","done":true,"usage":{"tokens_in":5,"tokens_out":42,"cost":0.0001}}// Request (imagen/audio)
{ "ask": "Un gato cyberpunk", "mode": "image-flux" }
// Response inmediata
{ "answer": "Procesando...", "task_id": "uuid", "done": false }
// Poll
GET /v1/task?id=uuid
// Mientras genera
{ "status": "processing", "answer": "Generando...", "done": false }
// Completado
{ "status": "completed", "answer": "https://i-a.mx/tmp/cat.png", "done": true }| Modo | Proveedor | Modelo | Servicio |
|---|---|---|---|
| agil | DeepSeek | deepseek-v4-flash | LLM |
| expert | DeepSeek | deepseek-v4-pro | LLM |
| focus | DeepSeek | deepseek-v4-pro + thinking | LLM |
| image-flux | Picsart | Flux | Imagen |
| image-edit | Picsart | Flux Edit | Imagen |
| tts-s2 | Fish Audio | S2-Pro | TTS |
| stt-s2 | Fish Audio | S2-Pro | STT |
| vision | Lightning | Gemini 3 Flash | Visión |
| gpt-4o | OpenAI | gpt-4o | LLM |
| gpt-4o-mini | OpenAI | gpt-4o-mini | LLM |
| Campo | Tipo | Default | Descripción |
|---|---|---|---|
ask * | string | — | Prompt o instrucción |
mode | string | expert | Modo (ver tabla arriba) |
service | string | auto | llm / image / tts / stt / vision |
stream | bool | false | SSE streaming (solo llm) |
temperature | float | — | Temperatura LLM |
max_tokens | int | 4096 | Máx tokens de salida |
voice | string | default | ID de voz TTS |
format | string | mp3 | Formato audio TTS |
image_url | string | — | URL imagen (visión) |
image_data | string | — | Base64 imagen (visión) |
count | int | 1 | Cantidad imágenes |
width | int | 1024 | Ancho imagen |
height | int | 1024 | Alto imagen |
curl https://i-a.mx/v1/task?id=uuid-abc \
-H "Authorization: Bearer $API_KEY"
curl https://i-a.mx/v1/me \
-H "Authorization: Bearer $API_KEY"
// { "id":"...", "name":"Cliente", "credits":999.99, "plan":"starter", "expires_at":"..." }
Conéctate a wss://i-a.mx/v1/stream, envía JSON con "mode" y "ask", recibe chunks stream.
const ws = new WebSocket('wss://i-a.mx/v1/stream');
ws.onopen = () => ws.send(JSON.stringify({
ask: "Cuenta del 1 al 10",
mode: "agil",
api_key: "sk-sa-..."
}));
ws.onmessage = e => {
const d = JSON.parse(e.data);
if (d.answer) console.log(d.answer); // stream chunk
if (d.done) ws.close();
};
| Servicio | Descripción |
|---|---|
| Text2Image | Genera imágenes desde prompt. Modo: image-flux |
| Image Edit | Edita/retoca imágenes existentes. Modo: image-edit |
| Remove Background | Quita fondo de imágenes (próximamente) |
| Photo Enhancement | Mejora calidad de fotos (próximamente) |
| AI Avatars | Genera avatares personalizados (próximamente) |
| Servicio | Descripción |
|---|---|
| Text to Speech | Convierte texto a voz. Single y multi-speaker. Modo: tts-s2. Voces: E-girl, Sarah, Adrian, Ethan, Selene, etc. |
| Speech to Text | Transcribe audio a texto. Modo: stt-s2 |
| Voice Cloning | Clona voces con audio de referencia. Crea modelos personalizados. |
| Multi-Speaker | Diálogos con múltiples voces usando tags <|speaker:0|> |
| Servicio | Descripción |
|---|---|
| Gemini 3 Flash | Análisis de imágenes, OCR, extracción de datos. Modo: vision. Envía image_url o image_data (base64). |
Cada cliente tiene su propia API key, créditos, rate limit y fecha de expiración. Los créditos se deducen automáticamente por uso. Recarga vía PayPal.
Los costos varían por proveedor y modo. El costo real se descuenta de tus créditos y se reporta en usage.cost de cada respuesta.
Contacta al admin para planes personalizados y recargas vía PayPal.