Skip to content

Embeddings and availability

Embeddings turn text into numeric vectors for retrieval, similarity comparisons and clustering. They do not return chat answers. A knowledge-base application generally also needs text chunking, a vector store, retrieval logic and an answer-generation model.

Request structure after availability is confirmed

Section titled “Request structure after availability is confirmed”

POST https://wudiapi.com/v1/embeddings

Replace the placeholder with an actually available embedding-model ID. Do not execute it unchanged:

{"model":"AVAILABLE_EMBEDDING_MODEL_ID","input":["First text passage","Second text passage"]}

Use Bearer authentication. Vectors normally appear in data[].embedding, with index identifying input order. Dimensions, batch size, input limits and support for dimensions depend on the specific model.

Confirm the embedding model and output dimensions first. Vectors produced by different models should not share the same index space. Switching models generally requires embedding the existing documents again.

For model-not-found or no-channel errors, confirm whether the service is available. For dimension mismatches, compare model output with the index configuration. Split text that exceeds model limits. If you only need a conversation, use Chat Completions.