WISA AI API quickstart
Use https://api.askwisa.com/v1 as your base URL. Choose the endpoint and authentication for your model: OpenAI Responses, Anthropic Messages, or Chat Completions.
Create a WISA account · Create an API key · Compare API prices in VND
Make your first request in Python
Install openai. Set WISA_API_KEY in your local environment, not in source code. List the models your key can call. Before using the example below, confirm its model is listed or choose another model that supports Chat Completions.
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.askwisa.com/v1", api_key=os.environ["WISA_API_KEY"])
for model in client.models.list():
print(model.id)reply = client.chat.completions.create(
model="glm-5.3-flash",
messages=[{"role": "user", "content": "Reply with one short sentence."}],
)
print(reply.choices[0].message.content)
Which endpoint should I use?
| Endpoint | Use | Authentication headers |
|---|---|---|
GET /v1/models | Models available to your key | Authorization: Bearer |
POST /v1/responses | OpenAI Responses | Authorization: Bearer |
POST /v1/messages | Anthropic Messages | x-api-key; anthropic-version: 2023-06-01 |
POST /v1/chat/completions | Chat Completions | Authorization: Bearer |
POST /v1/embeddings | Vector embeddings | Authorization: Bearer |
Troubleshooting
401: Check the key and the authentication headers for this endpoint.403: Check model access withGET /v1/modelsand verify the key settings before topping up.429: Back off and retry; check rate limits before increasing concurrency.- Match the endpoint and request body to the model example in Console. Check service reliability (Vietnamese) before retrying at scale.