For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DocsAPI ReferenceSDKs
DocsAPI ReferenceSDKs
      • Overview
      • Chat Completions
      • Prompt Templates
      • Files & Batches
      • Embeddings
      • Image Generation
      • Responses (Reasoning)
      • Compare (Multi-model)
      • Models
      • Error Handling
LogoLogo
On this page
  • Embeddings
Node.js SDK

Embeddings

||View as Markdown|
Was this page helpful?
Edit this page
Previous

Batches

Next

Image Generation

Built with

Embeddings

1const result = await client.embeddings.create({
2 model: "openai/text-embedding-3-small",
3 input: ["hello world", "goodbye world"],
4});
5
6console.log(result.data[0].embedding.length);