npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@iamex/iamex

v0.0.2

Published

IAMEX SDK para JavaScript/TypeScript (compat v1)

Readme

IAMEX SDK para JavaScript/TypeScript

Instalación

npm install @iamex/iamex

Obtener API Key

  • Portal: dev.iamex.io
  • Configurar en tu proyecto (elige 1):
    • .env (recomendado)
      IAMEX_API_KEY=TU_API_KEY
    • Variable de entorno
      • PowerShell: $env:IAMEX_API_KEY="TU_API_KEY"
      • bash/zsh: export IAMEX_API_KEY="TU_API_KEY"
    • Pasarla al constructor: new IAMEX({ apiKey: "TU_API_KEY" })

Uso rápido (Chat no-stream)

import { IAMEX } from '@iamex/iamex';

const client = new IAMEX(); // usa IAMEX_API_KEY del entorno
const chat = await client.chat.completions.create({
  model: 'IAM-advanced',
  messages: [{ role: 'user', content: 'Explica la recursión en una frase.' }],
});
console.log(chat.choices?.[0]?.message?.content);

Chat (stream, estilo OpenAI)

for await (const chunk of client.chat.completions.stream({
  model: 'IAM-advanced',
  messages: [{ role: 'user', content: 'Escribe un haiku sobre JavaScript.' }],
})) {
  const choice = (chunk.choices || [])[0] || {};
  const piece = (choice.delta || {}).content;
  if (piece) process.stdout.write(piece);
}

Chat (solo texto final, helper opcional)

let text = '';
for await (const piece of client.chat.completions.streamText({
  model: 'IAM-advanced',
  messages: [{ role: 'user', content: 'Dime un chiste corto.' }],
})) {
  text += piece;
}
console.log(text);

Text Completions (stream)

for await (const chunk of client.completions.stream({
  model: 'IAM-advanced',
  prompt: 'Di hola en 3 palabras.',
})) {
  const choice = (chunk.choices || [])[0] || {};
  const piece = choice.text || (choice.delta || {}).content;
  if (piece) process.stdout.write(piece);
}

Responses (no-stream y stream)

// no-stream
const resp = await client.responses.create({
  model: 'IAM-advanced',
  input: 'Escribe un haiku sobre JavaScript.'
});
console.log(resp.output_text);

// stream (mensajes)
for await (const obj of client.responses.stream({
  model: 'IAM-advanced',
  messages: [{ role: 'user', content: 'Escribe un haiku sobre JavaScript.' }],
})) {
  const out = (obj && typeof obj === 'object' && 'output_text' in obj) ? obj.output_text : '';
  if (typeof out === 'string' && out) process.stdout.write(out);
}

Generación de Imágenes

const imageResponse = await client.image.generate({
  model: 'IAM-image',
  prompt: 'Un paisaje montañoso al atardecer con colores vibrantes',
});
console.log(imageResponse.url || imageResponse.b64_json);

Análisis de Imágenes (Vision)

// Respuesta completa
const visionResponse = await client.vision.analyze({
  prompt: 'Describe esta imagen detalladamente. ¿Qué ves en ella?',
  image: 'imagen.jpg',
  max_tokens: 200,
  temperature: 0.7
});
console.log(visionResponse.choices[0].message.content);

// O usando el helper createText (solo el texto)
const description = await client.vision.createText({
  prompt: 'Describe esta imagen',
  image: 'imagen.jpg',
  max_tokens: 200,
  temperature: 0.7
});
console.log(description);

// También disponible como analisis (alias en español)
const analisis = await client.vision.analisis({
  prompt: '¿Qué hay en esta imagen?',
  image: 'imagen.jpg',
});
console.log(analisis.choices[0].message.content);

Notas

  • Streaming usa SSE; el servidor cierra con data: [DONE].
  • Helpers streamText y streamToText son opcionales, para extraer solo el texto final.
  • Para vision.analyze(), el parámetro image debe ser una ruta de archivo local (solo Node.js).
  • Los tipos MIME de imagen soportados son: image/jpeg, image/png, image/gif, image/webp, image/bmp.

Licencia: MIT