Generate vector embeddings for text using the OpenDunes API from Go.
Embeddings convert text into dense numeric vectors that capture semantic meaning — useful for search, clustering, classification, and retrieval-augmented generation (RAG).
The endpoint follows the OpenAI embeddings schema, so an OpenAI-compatible Go client pointed at https://opendunes.com/api/v1 drives it through its embeddings service — check your installed SDK version's own documentation for the exact call shape, since the Go client's parameter helpers change between releases. The wire surface below is the contract any Go HTTP client can target directly.
POST /embeddings with a model and an input (a string or an array of strings):
The response data array carries one object per input; each embedding is the vector, and usage.prompt_tokens reports what was billed:
Pass a slice of strings to embed multiple texts in one call. Each item in the response data array corresponds to the input at the same index.
Embedding models are listed in the catalog at GET /api/models?capability=embeddings. Look for models with the embeddings capability flag.
Embeddings are billed per input token at the model's DA rate.