المهارات javascript-sdk
📦

javascript-sdk

آمن 🌐 الوصول إلى الشبكة

Crear aplicaciones de IA con JavaScript SDK

متاح أيضًا من: inferen-sh

Integra más de 150 modelos de IA en aplicaciones JavaScript y TypeScript usando el SDK de inference.sh. Construye agentes, maneja respuestas de streaming y gestiona cargas de archivos con soporte completo de TypeScript.

يدعم: Claude Codex Code(CC)
📊 69 كافٍ
1

تنزيل ZIP المهارة

2

رفع في Claude

اذهب إلى Settings → Capabilities → Skills → Upload skill

3

فعّل وابدأ الاستخدام

اختبرها

استخدام "javascript-sdk". Generate an image of a sunset

النتيجة المتوقعة:

Task completed successfully. Output: { image_url: 'https://cloud.inference.sh/...' }

استخدام "javascript-sdk". Create an agent that can search and write

النتيجة المتوقعة:

Agent created with tools: [search_tool, write_tool]. Ready to process requests.

التدقيق الأمني

آمن
v1 • 2/28/2026

This is a legitimate JavaScript/TypeScript SDK documentation skill for inference.sh. The static analyzer detected patterns that are false positives (JavaScript template literals in code examples misinterpreted as shell commands) or legitimate SDK functionality (API key authentication via environment variables, network calls to inference API, file operations for uploads). No malicious intent detected.

9
الملفات التي تم فحصها
3,958
الأسطر التي تم تحليلها
4
النتائج
1
إجمالي عمليات التدقيق

مشكلات عالية المخاطر (1)

False Positive: External Commands Detection
The static analyzer flagged 367 instances of 'Ruby/shell backtick execution' - these are FALSE POSITIVES. The scanner detected JavaScript template literals (backticks) in markdown code blocks as shell commands. The skill contains TypeScript/JavaScript code examples in markdown documentation, not actual shell execution patterns.
مشكلات منخفضة المخاطر (2)
Environment Variable Access for Authentication
The SDK uses process.env.INFERENCE_API_KEY for authentication - this is a LEGITIMATE and SECURE pattern for API key management in Node.js applications.
Network Calls to inference.sh API
The SDK makes network calls to inference.sh API - this is EXPECTED BEHAVIOR for an AI SDK that connects to the inference.sh platform.
تم تدقيقه بواسطة: claude

درجة الجودة

45
الهندسة المعمارية
100
قابلية الصيانة
87
المحتوى
22
المجتمع
91
الأمان
87
الامتثال للمواصفات

ماذا يمكنك بناءه

Agregar generación de imágenes con IA a aplicaciones web

Integra flux-schnell u otros modelos de generación de imágenes en aplicaciones Next.js o React con actualizaciones de progreso en streaming.

Crear servicios Node.js con potencia de IA

Crea servicios backend que usan Claude, GPT y otros modelos para generación de texto, análisis y tareas de automatización.

Crear sistemas de IA multiagente

Orquestra múltiples agentes de IA especializados que colaboran en tareas complejas como investigación y creación de contenido.

جرّب هذه الموجهات

Generación básica de imágenes con IA
Use the javascript-sdk skill to generate an image with the flux-schnell model. Create a prompt for 'a futuristic city at sunset' and display the result.
Agente con llamada de herramientas
Use the javascript-sdk skill to create an agent that can search the web and write content. Set up a researcher tool and a writer tool, then ask the agent to create a blog post about machine learning.
Respuesta de texto en streaming
Use the javascript-sdk skill to run a text generation model with streaming enabled. Show how to handle the streaming response and display chunks as they arrive.
Carga de archivos con procesamiento de IA
Use the javascript-sdk skill to upload an image file and process it with a vision model. Show how to handle the file upload and receive the AI analysis.

أفضل الممارسات

  • Almacena las claves API en variables de entorno, nunca las confirmes en control de versiones
  • Usa streaming para tareas de larga duración para proporcionar actualizaciones de progreso en tiempo real
  • Implementa manejo de errores para fallos de red y límites de tasa de API

تجنب

  • Codificar claves API directamente en el código fuente
  • Bloquear en respuestas de streaming en lugar de manejar fragmentos de forma asíncrona
  • Ignorar los tipos TypeScript que proporcionan seguridad en tiempo de compilación

الأسئلة المتكررة

¿Cómo obtengo una clave API?
Regístrate en inference.sh, ve a Configuración, luego a Claves API, y crea una nueva clave.
¿Puedo usar esto en aplicaciones de navegador?
Sí, pero necesitas un servidor proxy para evitar exponer tu clave API. Usa la opción proxyUrl.
¿Qué modelos están disponibles?
El SDK soporta más de 150 modelos incluyendo flux-schnell, Claude, GPT y modelos de visión.
¿Soporta streaming?
Sí, pasa { stream: true } al método run e itera sobre el iterador asíncrono.
¿TypeScript está soportado?
Sí, se incluyen definiciones completas de TypeScript. Importa tipos como TaskDTO y ChatMessageDTO.
¿Puedo construir agentes con herramientas?
Sí, usa el constructor agentTool() para crear herramientas que pueden llamar a APIs externas u otras aplicaciones de IA.

تفاصيل المطور

المؤلف

inference-sh-9

الترخيص

MIT

مرجع

main