Token导航 LogoToken导航

Agent Skill · 研究检索

302ai-api-integration(302ai API 集成)

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

302ai-api-integration 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 56,510。

总安装 449周安装 18GitHub Stars 8下载 145核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:302ai-api-integration(302ai API 集成)
来源仓库:https://github.com/302ai/302ai-api-integration-skill
仓库路径:skills/302ai-api-integration
安装命令:
npx skills add https://github.com/302ai/302ai-api-integration-skill --skill 302ai-api-integration
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/302ai/302ai-api-integration-skill --skill 302ai-api-integration

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

快速帮助开发者将 302.AI 的 AI 能力集成到项目中,支持多种编程语言的代码生成。适用于寻找 LLM、图像生成、视频处理等各类 AI 功能, 自动匹配最合适的 API 并生成完整调用示例。使用时需提供具体需求如模型名称或功能类型,确保集成准确高效。

安装需通过 GitHub 仓库完成,使用前请确认 API Key 配置正确。

来源仓库内路径:skills/302ai-api-integration

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/302ai/302ai-api-integration-skill --skill 302a…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

302ai-api-integration 怎么安装?

在终端执行 npx skills add https://github.com/302ai/302ai-api-integration-skill --skill 302ai-api-inte…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

302ai-api-integration 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

302ai-api-integration 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

302ai-api-integration 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

302ai-api-integration 用的人多吗?

公开数据是累计安装 449 次,近一周安装 18 次,下载 145 次,GitHub 8 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

302ai-api-integration 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
302ai-api-integration

302ai API 集成 · 本页

4498接触敏感数据未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

302.AI API Integration Assistant

Quickly help users find and integrate any of 302.AI's 1400+ APIs into their code.

Description

This is a specialized assistant for 302.AI API integration. When users need AI capabilities in their projects, this Skill will:

  1. Automatically search 302.AI's API list to find the most suitable API
  2. Retrieve detailed API documentation and usage instructions
  3. Generate integration code based on user's programming language
  4. Configure code with user's API Key

Trigger Conditions

IMPORTANT: Use this skill proactively whenever user mentions:

  • Any AI functionality (LLM, image generation, video generation, audio processing, etc.)
  • Specific AI models (GPT-4, Claude, DALL-E, Stable Diffusion, etc.)
  • API needs or integration requirements
  • 302.AI or any AI service
  • Text processing, image editing, video creation, speech recognition, etc.

Workflow

Step 1: Get API Key

Before starting, must obtain user's 302.AI API Key:

To help you integrate 302.AI APIs, I need your API Key.

Please provide your 302.AI API Key (unified for all APIs):

Important:

  • All 302.AI APIs use a unified API Key
  • Must ask if user hasn't provided it
  • API Key format usually starts with sk-

Step 2: Understand User Requirements

Analyze what functionality user wants to implement and determine which API category is needed. Reference API categories:

1. Language Models (LLM)
  • Chat, text generation, code generation, translation, summarization, etc.
  • Includes: OpenAI, Claude, Gemini, Chinese models, etc.
2. Image Generation
  • Text-to-image, image-to-image, AI painting, etc.
  • Includes: DALL-E, Midjourney, Stable Diffusion, Flux, etc.
3. Image Processing
  • Image editing, background removal, super-resolution, style transfer, 3D generation, etc.
  • Includes: Basic features, advanced features, ComfyUI workflows
4. Video Generation
  • Text-to-video, image-to-video, digital humans, etc.
  • Includes: Runway, Pika, Luma AI, Kling, etc.
5. Audio/Video Processing
  • TTS (text-to-speech), STT (speech-to-text), music generation, audio processing
6. Information Processing
  • Search services, document processing, web scraping, social media, code execution
7. RAG Related
  • Embeddings, Rerank, knowledge base
8. Tool APIs
  • Creative tools, writing tools, professional tools
9. Management Functions
  • Account management, usage statistics

Step 3: Search APIs

⚠️ CRITICAL: Use the parse script, DO NOT read llms.txt directly

To reduce context usage, MUST use the scripts/parse_api_list.py script via Bash:

Bash Command Usage:

# Search by keyword
python3 scripts/parse_api_list.py "keyword"

# Search by keyword and category
python3 scripts/parse_api_list.py "keyword" "category"

# Examples:
python3 scripts/parse_api_list.py "GPT"
python3 scripts/parse_api_list.py "image generation"
python3 scripts/parse_api_list.py "chat" "language model"
python3 scripts/parse_api_list.py "nano-banana"

Python Module Usage (if needed):

from scripts.parse_api_list import fetch_llms_txt, parse_llms_txt, search_apis, extract_doc_id

# Auto-fetch latest API list
content = fetch_llms_txt()

# Parse API list
apis = parse_llms_txt(content)

# Search based on user needs (supports keyword and category filtering)
results = search_apis(apis, keyword='user_keyword', category='category')

# Display results for user selection
for i, api in enumerate(results, 1):
    print(f"{i}. {api['name']}")
    print(f"   Category: {api['category']}")
    print(f"   Description: {api['description']}")
    print(f"   Docs: {api['link']}")

⚠️ CRITICAL RULES (MUST FOLLOW):

  • ALWAYS use the script to search APIs, don't be lazy!
  • FORBIDDEN to use WebFetch to directly read llms.txt, this wastes massive context
  • Script automatically fetches the latest API list
  • Note: /v1/models endpoint only lists LLM language models, NOT image/video/audio models
  • If user needs image generation, video generation, audio processing, etc., MUST use script to search llms.txt for corresponding APIs

For detailed usage, refer to references/parse_script_usage.md.

Step 4: Search and Filter APIs

Based on user needs and Step 2 categories, search for matching APIs in the API list:

  1. Filter by category: First locate the major category and subcategory
  2. Keyword matching: Search for relevant keywords in descriptions
  3. Model matching: If user specifies a specific model (like GPT-4), match directly

Step 5: Display Candidate APIs

Show found APIs to user for selection:

I found the following available APIs:

1. **OpenAI Chat**
   - Category: Language Models > OpenAI
   - Description: Supports GPT-4, GPT-3.5 and other chat models
   - Docs: https://doc.302.ai/147522039e0.md

2. **Claude Chat**
   - Category: Language Models > Claude
   - Description: Supports Claude 3.5 Sonnet, Claude 3 Opus and other models
   - Docs: https://doc.302.ai/xxxxxxxxx.md

Please select the API you want to use (enter number):

Step 6: Get Detailed Documentation

After user selection, use WebFetch to get detailed API documentation:

WebFetch(
    url="[user_selected_api_doc_link]",
    prompt="Extract API endpoint, request parameters, response format, usage examples and other detailed information"
)

Step 7: Generate Integration Code

Generate complete integration code based on:

  1. User's programming language (ask user or infer from context)
  2. API detailed documentation (from Step 6)
  3. User's API Key (from Step 1)
  4. User's specific requirements (e.g., parameter configuration, feature customization)

Reference code templates in references/integration_examples.md, generate code including:

  • Complete API call function
  • Correct endpoint URL
  • Required request headers (including API Key)
  • Request parameter examples
  • Error handling
  • Usage examples

Supported Programming Languages:

  • Python
  • JavaScript/Node.js
  • TypeScript
  • Go
  • cURL commands
  • Others (based on user needs)

Step 8: Code Explanation and Optimization Suggestions

After generating code, provide:

  1. Code explanation: Explain key parts
  2. Parameter explanation: List configurable parameters and their meanings
  3. Usage examples: Show how to call the generated functions
  4. Important notes:

- API Key security (recommend using environment variables) - Rate limits - Error handling - Timeout settings

  1. Optimization suggestions: Provide performance optimization suggestions based on user scenario

Code Generation Standards

Python Code Standard

import requests
import json

# 302.AI API Configuration
API_KEY = "{user_API_KEY}"
BASE_URL = "https://api.302.ai"

def call_api(endpoint, data):
    """
    Call 302.AI API

    Args:
        endpoint: API endpoint
        data: Request data

    Returns:
        API response result
    """
    headers = {
        "Authorization": f"Bearer {API_KEY}",
        "Content-Type": "application/json"
    }

    url = f"{BASE_URL}{endpoint}"

    try:
        response = requests.post(url, headers=headers, json=data)
        response.raise_for_status()
        return response.json()
    except requests.exceptions.RequestException as e:
        print(f"API call failed: {e}")
        return None

# Usage example
if __name__ == "__main__":
    result = call_api("/v1/chat/completions", {
        "model": "gpt-4",
        "messages": [
            {"role": "user", "content": "Hello!"}
        ]
    })

    if result:
        print(json.dumps(result, indent=2, ensure_ascii=False))

JavaScript Code Standard

const axios = require('axios');

// 302.AI API Configuration
const API_KEY = '{user_API_KEY}';
const BASE_URL = 'https://api.302.ai';

async function callAPI(endpoint, data) {
    try {
        const response = await axios.post(`${BASE_URL}${endpoint}`, data, {
            headers: {
                'Authorization': `Bearer ${API_KEY}`,
                'Content-Type': 'application/json'
            }
        });
        return response.data;
    } catch (error) {
        console.error('API call failed:', error.message);
        return null;
    }
}

// Usage example
(async () => {
    const result = await callAPI('/v1/chat/completions', {
        model: 'gpt-4',
        messages: [
            { role: 'user', content: 'Hello!' }
        ]
    });

    if (result) {
        console.log(JSON.stringify(result, null, 2));
    }
})();

Advanced Features

Streaming Response Handling

For APIs supporting streaming responses (like chat models), generate streaming code:

Python Streaming Example:

def call_api_stream(endpoint, data):
    headers = {
        "Authorization": f"Bearer {API_KEY}",
        "Content-Type": "application/json"
    }

    url = f"{BASE_URL}{endpoint}"

    response = requests.post(url, headers=headers, json=data, stream=True)

    for line in response.iter_lines():
        if line:
            line = line.decode('utf-8')
            if line.startswith('data: '):
                data = line[6:]
                if data != '[DONE]':
                    yield json.loads(data)

Batch Processing

For scenarios requiring batch calls, provide batch processing code:

def batch_call_api(endpoint, data_list):
    results = []
    for data in data_list:
        result = call_api(endpoint, data)
        if result:
            results.append(result)
    return results

Async Processing

For high-concurrency scenarios, provide async processing code:

Python Async Example:

import asyncio
import aiohttp

async def call_api_async(session, endpoint, data):
    headers = {
        "Authorization": f"Bearer {API_KEY}",
        "Content-Type": "application/json"
    }

    url = f"{BASE_URL}{endpoint}"

    async with session.post(url, headers=headers, json=data) as response:
        return await response.json()

async def batch_call_async(endpoint, data_list):
    async with aiohttp.ClientSession() as session:
        tasks = [call_api_async(session, endpoint, data) for data in data_list]
        return await asyncio.gather(*tasks)

Common Issues

1. Invalid API Key

If you encounter "Invalid API Key" error:
1. Check if API Key is correctly copied (watch for spaces)
2. Confirm API Key is activated
3. Check if API Key has sufficient quota
4. Visit 302.AI console to confirm Key status

2. Rate Limiting

If you encounter "Rate Limit Exceeded" error:
1. Add request intervals (time.sleep() or setTimeout())
2. Implement exponential backoff retry mechanism
3. Consider upgrading API plan
4. Use batch interfaces to reduce request count

3. Timeout Errors

If you encounter timeout errors:
1. Increase request timeout duration
2. Check network connection
3. For large file processing, consider using async interfaces
4. Implement retry mechanism

Reference Resources

Usage Examples

Example 1: Integrate GPT-4 Chat

User: "I want to use GPT-4 in my Python project"

Assistant:

  1. Ask for API Key
  2. Get latest API list
  3. Find OpenAI Chat API
  4. Get detailed documentation
  5. Generate Python integration code
  6. Provide usage instructions and optimization suggestions

Example 2: Integrate Image Generation

User: "I need to call DALL-E to generate images in Node.js"

Assistant:

  1. Ask for API Key
  2. Get latest API list
  3. Find DALL-E API in image generation category
  4. Get detailed documentation
  5. Generate JavaScript integration code
  6. Provide image download and save example code

Example 3: Integrate Speech-to-Text

User: "How to use 302.AI's speech recognition API?"

Assistant:

  1. Ask for API Key and programming language
  2. Get latest API list
  3. Find speech recognition API in Audio/Video Processing > STT category
  4. Get detailed documentation
  5. Generate integration code in corresponding language
  6. Provide complete example for audio file upload and processing

Important Notes

  1. API Key Security:

- Never hardcode API Key in public code - Recommend using environment variables or config files - Ignore files containing API Key in version control - ⚠️ CRITICAL WARNING: For pure frontend web pages (HTML/JavaScript), API Key will be exposed in client code, posing leak risk - RECOMMENDED SOLUTION: Use backend frameworks like Next.js, Express, Flask to call APIs on server side, frontend accesses indirectly through backend endpoints

  1. Error Handling:

- Always include comprehensive error handling logic - Log errors for debugging - User-friendly error messages

  1. Performance Optimization:

- For high-frequency calls, consider using connection pools - Implement request caching to reduce duplicate calls - Use async processing to improve concurrency performance

  1. Cost Control:

- Monitor API call volume - Set call limits - Optimize prompts to reduce token consumption

  1. Documentation Updates:

- API list is updated regularly - Re-fetch latest list before each use - Follow 302.AI official announcements

适合场景

01

文本生成图片

02

图片风格化

03

产品图和创意图

04

需要 FLUX 模型时

能力概览

能力 1

调用 FLUX 图像模型

能力 2

支持文本生图和图像改写

能力 3

覆盖 LoRA 或风格适配

能力 4

适合创意视觉生成

平台分布

Codex

33.37%
按下载量换算48

Claude

28.4%
按下载量换算41

Cursor

19.04%
按下载量换算28

Gemini CLI

9.25%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills