HomeConsoleModel CatalogAI StudioAPI DocsAbout中文

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

  1. Visit the shenmeai website and register, then log in to the console.
  2. Complete your account details and prepare your balance in the console.

Create an API Key

  1. Go to the console → Token Management.
  2. Create a new token and copy the generated API Key (it cannot be viewed in full again later, so store it safely).
  3. 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 CategoryTypeEndpoints
Video generationvideoPOST /v1/videos
GET /v1/videos/{task_id}
GET /v1/videos/{task_id}/content
Image generationimagePOST /v1/images/generations
GET /v1/images/generations/{task_id}
Text chattextPOST /v1/chat/completions

C. Text Model API

Available Endpoints

Text models provide an OpenAI-compatible chat completion endpoint.

MethodPathDescription
POST/v1/chat/completionsText 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

ParameterTypeDescription
modelstringModel ID, e.g. deepseek-v4-pro
messagesarrayChat messages with role / content
temperaturenumberSampling temperature (optional)
max_tokensnumberMaximum 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.

MethodPathDescription
POST/v1/images/generationsSubmit 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

ParameterDescription
modelImage model ID
promptImage description
sizeResolution tier (model dependent)
imageReference 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.

MethodPathDescription
POST/v1/videosSubmit a video generation task, returns task_id
GET/v1/videos/{task_id}Query video task status and progress
GET/v1/videos/{task_id}/contentDownload 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

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:

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

CodeMeaningSuggested Action
400Invalid parametersCheck model / prompt / required fields
401Authentication failedCheck the API Key and the Bearer prefix
404Model not foundUse GET /v1/models to confirm the models available to your key
429Rate or quota limitedReduce concurrency or check your account balance
500Temporary service issueRetry later; contact support if it persists

Common Issues and Troubleshooting

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