shenmeai API Documentation
This documentation is generated from shenmeai's real backend API and covers quick start, model queries, text / image / video endpoints, authentication and billing. Models and prices are subject to the live model catalog.
A. Quick Start
Platform Overview
shenmeai provides a unified OpenAI-compatible API for large language models, image generation and video generation. A single API Key gives you access to all listed models, reducing the cost of integrating and maintaining multiple platforms.
Sign Up and Log In
- Visit the shenmeai website and register, then log in to the console.
- Complete your account details and prepare your balance in the console.
Create an API Key
- Go to the console → Token Management.
- Create a new token and copy the generated API Key (it cannot be viewed in full again later, so store it safely).
- Optionally set a quota and IP restrictions for the token (if enabled).
API Base URL
https://shenmeai.vip/v1
Authentication
All requests carry a Bearer token in the request header:
Authorization: Bearer YOUR_API_KEY
First API Request
Using a text model as an example, send a chat request:
curl https://shenmeai.vip/v1/chat/completions \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{"model":"deepseek-v4-pro","messages":[{"role":"user","content":"Hello"}]}'Reading the Response
A successful response returns an OpenAI-compatible JSON structure with fields such as id, object and choices; image and video requests are asynchronous tasks that return a task_id, which you poll for status before fetching the result. See the endpoint sections below for details.
B. Model Queries
Listing Models
Call GET /v1/models to list the models available to your account:
curl https://shenmeai.vip/v1/models -H 'Authorization: Bearer YOUR_API_KEY'
Model IDs
Each model has a unique model ID (such as deepseek-v4-pro or minimax-h3), specified via the model field of the request body. Model IDs follow the model catalog and the /v1/models response.
Model Availability
Model availability follows the live public catalog. Models may be added or removed over time, so always confirm via /v1/models before calling.
Model Capabilities and Parameters
The endpoints, parameters, resolutions, durations and reference assets supported by each model are described in the endpoint sections below and in the model cards in the model catalog.
Billing
Models are billed per token, per second or per request, depending on the model; units and unit prices are listed in the model catalog. Check the actual price and billing unit for a model there before submitting a task.
Access Limits
The models available to you are limited by your account balance and token permissions. Insufficient balance or missing permissions return the corresponding error codes (see section G).
| Model Category | Type | Endpoints |
|---|---|---|
| Video generation | video | POST /v1/videosGET /v1/videos/{task_id}GET /v1/videos/{task_id}/content |
| Image generation | image | POST /v1/images/generationsGET /v1/images/generations/{task_id} |
| Text chat | text | POST /v1/chat/completions |
C. Text Model API
Available Endpoints
Text models provide an OpenAI-compatible chat completion endpoint.
| Method | Path | Description |
|---|---|---|
POST | /v1/chat/completions | Text chat (OpenAI compatible) |
Request Example
curl https://shenmeai.vip/v1/chat/completions \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"model":"deepseek-v4-pro","messages":[{"role":"user","content":"Hello"}]}'
Response Example
{"id":"chatcmpl-xxx","object":"chat.completion","choices":[{"index":0,"message":{"role":"assistant","content":"Hello"}}]}
Request Format
The request body is JSON; messages is the array of chat messages and model specifies the model ID.
Parameters
| Parameter | Type | Description |
|---|---|---|
| model | string | Model ID, e.g. deepseek-v4-pro |
| messages | array | Chat messages with role / content |
| temperature | number | Sampling temperature (optional) |
| max_tokens | number | Maximum number of tokens to generate (optional) |
Response Format
The response is an OpenAI-compatible structure; the generated text is in choices[0].message.content.
Python Example
import requests
url = "https://shenmeai.vip/v1/chat/completions"
headers = {"Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json"}
data = {"model": "deepseek-v4-pro", "messages": [{"role": "user", "content": "Hello"}]}
r = requests.post(url, headers=headers, json=data)
print(r.json())
JavaScript Example
const res = await fetch("https://shenmeai.vip/v1/chat/completions", {
method: "POST",
headers: { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({ model: "deepseek-v4-pro", messages: [{ role: "user", content: "Hello" }] }),
});
console.log(await res.json());
cURL Example
curl https://shenmeai.vip/v1/chat/completions \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"model":"deepseek-v4-pro","messages":[{"role":"user","content":"Hello"}]}'
D. Image Generation API
Available Image Endpoints
Image generation supports text-to-image, image-to-image and reference-image editing. Tasks are submitted asynchronously and results are then queried.
| Method | Path | Description |
|---|---|---|
POST | /v1/images/generations | Submit an image generation task |
GET | /v1/images/generations/{task_id} | Query image task status and result |
Request Example
curl https://shenmeai.vip/v1/images/generations \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"model":"gpt-image-2.6-flare","prompt":"a cat running on the grass"}'
Response Example
{"task_id":"img_xxx","status":"processing"}
Text-to-Image
Submit via POST /v1/images/generations; the prompt describes the scene and the response returns a task_id.
Image-to-Image / Reference Images
You can upload reference images for editing and generation. Reference images are uploaded via multipart; parameter mapping follows each model card.
Resolutions
Available resolution tiers vary by model; check the sizes supported on the corresponding model card before calling.
Parameter Mapping
| Parameter | Description |
|---|---|
| model | Image model ID |
| prompt | Image description |
| size | Resolution tier (model dependent) |
| image | Reference image (image-to-image / reference, model dependent) |
Fetching Results
Submission returns a task_id; query status and the result URL via GET /v1/images/generations/{task_id}.
Error Handling
Failed tasks are settled according to the billing rules; error codes are listed in section G.
E. Video Generation API
This section is the video-specific documentation and is related to the video API guide.
Video Generation Endpoints
Video generation is submitted as asynchronous tasks and supports text-to-video and image-to-video.
| Method | Path | Description |
|---|---|---|
POST | /v1/videos | Submit a video generation task, returns task_id |
GET | /v1/videos/{task_id} | Query video task status and progress |
GET | /v1/videos/{task_id}/content | Download the generated video stream |
Request Example
curl https://shenmeai.vip/v1/videos \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"model":"minimax-h3","prompt":"a cat running on the grass"}'
Response Example
{"task_id":"vid_xxx","status":"processing"}
Text-to-Video
Submit via POST /v1/videos; the prompt describes the video content and the response returns a task_id.
Image-to-Video
Upload a first frame or reference image to drive video generation; details follow each model card's reference-asset description.
Reference Uploads / Video References
Reference images, reference videos and reference audio are supported (quantity limits depend on the model), submitted via multipart.
Duration and Resolution
Duration and resolution tiers vary by model; check the corresponding model card before calling.
Asynchronous Submission
Submission returns a task_id immediately; the task is generated in the background.
Querying Task Status
Query status and progress via GET /v1/videos/{task_id}.
Fetching the Final Video
Once generation completes, download the video stream via GET /v1/videos/{task_id}/content; the query response also includes a direct link to the result.
Failure Handling
Failed tasks are settled according to the actual billing rules; error codes are listed in section G. For models that allow retries, submit again later.
F. Authentication and Security
Creating an API Key
Create an API Key in the console → Token Management. Each key can have its own quota.
Authorization Bearer
All endpoints are authenticated via the request header:
Authorization: Bearer YOUR_API_KEY
Key Management
- Keep your API Key safe; never leak it or commit it to public repositories.
- Keys can be disabled or deleted in the console at any time.
- We recommend splitting keys by use case to isolate quotas and permissions.
Access Limits
The models and quota available to a key are constrained by your account and token configuration.
IP Restrictions (if enabled)
If IP allowlisting is enabled for a token, only IPs on the list can call it, protecting the key from theft.
Key Security
Never hardcode a real key in frontend code, public examples or logs. Key storage and verification are handled server-side.
G. Billing and Error Codes
Billing Units
Different models are billed differently:
- Text models: billed per token (input / output counted separately).
- Video models: billed per second or per request (model dependent).
- Image models: billed per request (model dependent).
Checking Prices
Current model prices and billing units are published in the model catalog and via the public pricing endpoint GET /api/pricing.
When You Are Charged
Tasks are charged based on the actual call parameters once accepted. Failed tasks are settled according to the actual billing rules (see model cards and the refund policy at /refund).
Refunds for Failed Tasks
Billing for failed tasks follows the refund policy; the actual billing rules prevail.
Request IDs
When reporting an issue, provide the request ID and task ID so it can be located quickly.
Error Codes
| Code | Meaning | Suggested Action |
|---|---|---|
400 | Invalid parameters | Check model / prompt / required fields |
401 | Authentication failed | Check the API Key and the Bearer prefix |
404 | Model not found | Use GET /v1/models to confirm the models available to your key |
429 | Rate or quota limited | Reduce concurrency or check your account balance |
500 | Temporary service issue | Retry later; contact support if it persists |
Common Issues and Troubleshooting
- 401: confirm the key is correct and carries the Bearer prefix.
- 404: confirm via
/v1/modelsthat the model is available to your key. - 429: reduce concurrency or check your account balance.
- 500: temporary service issue; retry later and contact support if it persists.
H. Complete Examples
The examples below use real endpoints of this site and can be reproduced directly (replace YOUR_API_KEY and the model IDs).
Text Chat
curl https://shenmeai.vip/v1/chat/completions \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"model":"deepseek-v4-pro","messages":[{"role":"user","content":"Hello"}]}'
Image Generation
curl https://shenmeai.vip/v1/images/generations \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"model":"gpt-image-2.6-flare","prompt":"a cat running on the grass"}'
Video Generation
curl https://shenmeai.vip/v1/videos \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"model":"minimax-h3","prompt":"a cat running on the grass"}'
Querying a Video Task
curl https://shenmeai.vip/v1/videos/{task_id} -H 'Authorization: Bearer YOUR_API_KEY'
Downloading a Video
curl https://shenmeai.vip/v1/videos/{task_id}/content -H 'Authorization: Bearer YOUR_API_KEY' -o output.mp4