API Documentation
Quick integration guide and complete API reference
Models
Get a real callable model ID first
Every request must use a real callable model ID in the model field. For a first integration, fetch the model list first, then copy one callable model ID into your test request.
If a token has model access limits, it can only call the models assigned to that token. A model can exist but still fail if the current token cannot access it.
Fetch the model list
Call /v1/models to see the models available to your account or token. Copy the id field from the response and use it as the model value in later requests.
curl
bashcurl https://api.weiapi.ai/v1/models \ -H "Authorization: Bearer sk-your-api-key"
| Field | What it means | How to use it |
|---|---|---|
| id | The real model ID used for calls. | Copy it into the request body's model field or the Model ID field in a tool. |
| capabilities | The capabilities supported by the model, such as text, image, video, or multimodal. | Use it to choose whether to call the text, image, or video endpoint. |
| billing_type | The model's billing mode. | Use it with the pricing page or model details to understand cost. |
| enabled | Whether the model is currently available. | Prefer enabled models with available channels. |
How to choose for your first test
Text / multimodal
Start with a text or multimodal model and call /v1/chat/completions. It is the easiest success path.
Image generation
Choose an image model, then call /v1/images/generations. For the first test, generate only one image.
Video generation
Choose a video model and test the async flow: create task, poll task, then read the result.
Things to keep in mind
- Do not submit YOUR_MODEL_ID literally. It is only a placeholder.
- If you get a 404, first check whether the model ID exists, is spelled correctly, and is allowed for the current token.
- If you are not sure about model capabilities, complete one minimal text request first, then continue with image or video.
