wylon

API Manual

wylon Token Factory exposes an OpenAI-compatible inference API. All endpoints share the same base URL and authentication scheme. This section documents request parameters, response shapes, and multi-language code samples for each endpoint.

Basics

Base URLstring
https://api.wylon.cn/v1
AuthHTTP Bearer
Every request must carry Authorization: Bearer wl-.... Manage keys in the dashboard.
Content-Typestring
JSON requests use application/json; file uploads use multipart/form-data; streamed responses are text/event-stream.
Compatibilityprotocol
Paths and field names follow the OpenAI protocol exactly. You can use the official openai SDKs or any OpenAI-compatible client by swapping base_url and api_key.

Endpoints

Text-only endpoints currently exposed by wylon.

GroupMethod & pathPurpose
Chat & completionsPOST/chat/completionsConversational generation (streaming, tools, structured output)
EmbeddingsPOST/embeddingsText vector embeddings
RerankPOST/rerankRe-rank candidate documents by query relevance
ModelsGET/modelsList models available to your account
Batch
(coming soon)
POST/batchesCreate a batch job
GET/batches/{id}Retrieve job status
POST/batches/{id}/cancelCancel a batch job

Error envelope

Errors use the OpenAI-compatible envelope:

Error response
{
  "error": {
    "type":    "invalid_request_error",
    "message": "…",
    "code":    "invalid_api_key"
  }
}

Common HTTP statuses: 400 bad request / 401 authentication failed / 403 forbidden / 429 exceeded a rate limit / 500, 503 transient server errors. See each endpoint page for details.

沪ICP备2026010432号-1 沪公网安备31010402336632号