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
Go SDK

Embeddings

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

Batches

Next

Image Generation

Built with

Embeddings

1resp, err := client.Embeddings.Create(ctx, meshapi.EmbeddingsParams{
2 Model: "openai/text-embedding-3-small",
3 Input: []string{"The quick brown fox", "jumped over the lazy dog"},
4})
5
6for _, emb := range resp.Data {
7 fmt.Printf("Vector length: %d\n", len(emb.Embedding))
8}