# Copywriting Base URL `https://api.sniphunter.com` 文案提取、改写和生成。 # Copywriting ## POST /api/v1/copywriting/audio-to-text Audio To Text 音频转文案 将上传的音频文件转录为文字。使用远程 AI 推理服务进行语音识别。 注意: 需要配置 AI 推理服务 (SH_INFER_ENABLED=true) ```json { "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_audio_to_text_api_v1_copywriting_audio_to_text_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/copywriting/detect-forbidden Detect Forbidden Words 违禁词检测 ```json { "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenWordRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/copywriting/extract-link Extract Link 从链接提取口播文案 短视频链接流水线:解析视频 → 分离音频 → ASR 识别 → 返回文案。 普通网页仍走 HTML 抓取。 ```json { "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LinkExtractionRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/copywriting/image-to-text Image To Text 图片转文案:经 Backend 调 Media OCR(model=auto|glm-ocr|pp-ocrv5)。 ```json { "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_image_to_text_api_v1_copywriting_image_to_text_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/copywriting/marketing Generate Marketing 生成营销文案 ```json { "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarketingRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/copywriting/product-review Generate Product Review 生成产品测评 ```json { "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProductReviewRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/copywriting/smart-original Smart Original 智能原创 ```json { "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SmartOriginalRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/copywriting/video-script Generate Video Script 生成视频脚本 ```json { "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VideoScriptRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/copywriting/webpage-scrape Webpage Scrape 网页解析转文案(Backend → Media web scrape) ```json { "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebpageScrapeCopyRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/copywriting/word-to-text Word To Text 文档转文案(Backend → Media anydoc) ```json { "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_word_to_text_api_v1_copywriting_word_to_text_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` ## POST /api/v1/copywriting/xiaohongshu Generate Xiaohongshu 生成小红书风格文案 ```json { "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/XiaohongshuRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } ``` # Components ```json { "schemas": { "Body_audio_to_text_api_v1_copywriting_audio_to_text_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" } }, "type": "object", "required": [ "file" ], "title": "Body_audio_to_text_api_v1_copywriting_audio_to_text_post" }, "Body_image_to_text_api_v1_copywriting_image_to_text_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" }, "model": { "type": "string", "title": "Model", "default": "auto" } }, "type": "object", "required": [ "file" ], "title": "Body_image_to_text_api_v1_copywriting_image_to_text_post" }, "Body_word_to_text_api_v1_copywriting_word_to_text_post": { "properties": { "file": { "type": "string", "format": "binary", "title": "File" } }, "type": "object", "required": [ "file" ], "title": "Body_word_to_text_api_v1_copywriting_word_to_text_post" }, "ForbiddenWordRequest": { "properties": { "text": { "type": "string", "title": "Text" } }, "type": "object", "required": [ "text" ], "title": "ForbiddenWordRequest" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "LinkExtractionRequest": { "properties": { "url": { "type": "string", "title": "Url" } }, "type": "object", "required": [ "url" ], "title": "LinkExtractionRequest" }, "MarketingRequest": { "properties": { "product": { "type": "string", "title": "Product" }, "scene": { "type": "string", "title": "Scene", "default": "general" } }, "type": "object", "required": [ "product" ], "title": "MarketingRequest" }, "ProductReviewRequest": { "properties": { "product": { "type": "string", "title": "Product" } }, "type": "object", "required": [ "product" ], "title": "ProductReviewRequest" }, "SmartOriginalRequest": { "properties": { "text": { "type": "string", "title": "Text" }, "style": { "type": "string", "title": "Style", "default": "rewrite" } }, "type": "object", "required": [ "text" ], "title": "SmartOriginalRequest" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "VideoScriptRequest": { "properties": { "topic": { "type": "string", "title": "Topic" }, "style": { "type": "string", "title": "Style", "default": "short" } }, "type": "object", "required": [ "topic" ], "title": "VideoScriptRequest" }, "WebpageScrapeCopyRequest": { "properties": { "url": { "type": "string", "title": "Url" }, "fetch": { "type": "string", "title": "Fetch", "default": "auto" } }, "type": "object", "required": [ "url" ], "title": "WebpageScrapeCopyRequest" }, "XiaohongshuRequest": { "properties": { "topic": { "type": "string", "title": "Topic" } }, "type": "object", "required": [ "topic" ], "title": "XiaohongshuRequest" } }, "securitySchemes": { "HTTPBearer": { "type": "http", "scheme": "bearer" } } } ```