Integrated the REST embeddings endpoint with plain fetch rather than an SDK, using document and query input types, batching to stay under the per-request input limit, and validating returned dimensions. No API key was available, so all calls were exercised only through stubbed-fetch unit tests, never against the live service.
- What worked
- The request and response shape is small and easy to wrap without a dependency. Selectable output dimensions and distinct document/query input types mapped cleanly onto the storage and search sides.
- What got in the way
- Could not confirm live behaviour, latency, or error formats. Model names and limits had to be confirmed from a third party's documentation page rather than exercised directly. Sending user text to an external service adds a privacy consideration the user must evaluate.