Source: https://01router.com/zh/docs/prompts Base URL: https://01router.com/api/v1 # 提示词 API 公开只读接口,无需 API Key,不扣除积分。复用提示词库中已启用模型的已发布示例,支持按模型、来源和场景组合筛选。 `GET /api/v1/prompts` 公开接口 · 无需 API Key ## 输入参数 | Field | Type | Required | Description | Constraints | | --- | --- | --- | --- | --- | | model | string | no | 可选。模型 slug,例如 seedance-2.5;不传则查询所有模型。返回的 categories 提供可选模型及各模型的收录量。 | | | source | string | no | 可选。来源域名,例如 evolink.ai;seed 表示种子示例,unknown 表示未标注来源。使用 sources 返回的 name,不是模型供应商路由参数。 | | | scene | string | no | 可选。场景分类的完整名称,例如 Cinematic Story;使用 scenes 返回的 name,并对查询值进行 URL 编码。 | | | locale | string | no | 可选,en 或 zh,默认 en。返回对应语言及语言通用的记录;详情接口也接受此参数。 | default: "en"; options: [ "en", "zh" ] | | page | integer | no | 可选。1–100000 的整数,默认 1,每页固定 24 条。超过总页数时返回最后一页;空结果的 total_pages 为 1。 | default: 1; min: 1; max: 100000 | ## 输出字段 | Field | Type | Required | Description | Constraints | | --- | --- | --- | --- | --- | | data | array | — | 公开提示词对象:id、title、prompt、category、source、mediaType、mediaUrl、modelSlug 和 modelName。 | | | total | integer | — | 匹配记录的总数。 | | | page / page_size / total_pages | integer | — | 可选。1–100000 的整数,默认 1,每页固定 24 条。超过总页数时返回最后一页;空结果的 total_pages 为 1。 | | | categories / sources / scenes | array | — | 可用模型分类、来源和场景及数量,统计范围见下方说明。 | | ## cURL ```bash curl 'https://01router.com/api/v1/prompts?model=seedance-2.5&locale=en&page=1' ``` ## 200 · application/json ```json { "object": "list", "data": [ { "id": "prompt_example", "title": "Cinematic landscape", "prompt": "A cinematic landscape at sunrise.", "category": "Cinematic Story", "source": "evolink.ai", "mediaType": "video", "mediaUrl": "https://example.com/video.mp4", "modelSlug": "seedance-2.5", "modelName": "Seedance 2.5" } ], "total": 1, "page": 1, "page_size": 24, "total_pages": 1, "categories": [ { "slug": "seedance-2.5", "name": "Seedance 2.5", "type": "video", "total": 1 } ], "sources": [ { "name": "evolink.ai", "total": 1 } ], "scenes": [ { "name": "Cinematic Story", "total": 1 } ] } ``` ## 使用说明 - 下方为返回结构示意,数量和内容以实际响应为准。data 为提示词数组;categories 为当前语言下所有模型分类;sources 的数量按当前模型统计,scenes 的数量按当前模型和来源统计;total 是应用全部筛选后的数量。category 表示场景分类,modelSlug 表示模型分类。 - 使用返回的 modelSlug 和 prompt 构造下方请求体,调用 POST /generations;生成接口仍需 API Key,并按模型计费。其他生成参数请通过 GET /models/{slug} 查询后补充。 - 参数无效返回 400;模型分类或提示词不存在、停用或在所选语言下不可见时返回 404;有效分类下无匹配结果返回 200 和空 data。接口按 IP 限流,同一路径请求间隔至少 200 毫秒,触发时返回 429 和 Retry-After;成功响应允许缓存 60 秒。