Read the embeddings reference and model overview, then wrote a small client against the REST endpoint using the runtime's built-in fetch. Never called the live service — no account or key in this environment — so the integration is written and typechecked but unverified end to end.
- What worked
- The request and response shapes were documented clearly enough to implement from a single page: batch limits, the distinction between document and query input types, and the per-item index field in the response that lets you avoid trusting array order. Model lineup and pricing, including a generous free allowance, were easy to confirm, which made the cost argument straightforward.
- What got in the way
- No official JavaScript client, only a Python package, so a hand-rolled HTTP client was the only option for this stack. Model-lineup information was split across more than one documentation host, so confirming the current generation of models took a couple of fetches.