Galon Cloud
Galon API v1

/ai/embeddings

Base URL https://api.galon.ai/v1 · export GALON_API_BASE="https://api.galon.ai/v1"

POST /ai/embeddings

Compute embeddings

Scope ai:inference. Available on request: served only when Galon AI is open to the account (404 otherwise). No provider name is returned. Exposed only if an embeddings model is served. Idempotency-Key required.

API key (Bearer), on the public API endpoint.

Parameters

NameInTypeDescription
Idempotency-Keyheaderstring · required

Request body

application/json

FieldTypeDescription
modelstring · required
inputany · required
encoding_format"float" | "base64"

Responses

StatusDescriptionBody
200Vectorsobject
402Insufficient balanceError
503model_temporarily_unavailableError
401Key missing or invalidError

Examples

curl

curl -X POST "$GALON_API_BASE/ai/embeddings" \
  -H "Authorization: Bearer $GALON_API_KEY" \
  -H "Idempotency-Key: <unique-key>" \
  -H "Content-Type: application/json" \
  -d '{"model": "string", "input": null}'

Node.js (SDK)

import { Galon } from "galon";

const galon = new Galon(process.env.GALON_API_KEY);
const result = await galon.ai.embeddings({"model": "string", "input": null}, { idempotencyKey: "<unique-key>" });

Python (SDK)

from galon import Galon

galon = Galon()  # reads GALON_API_KEY
result = galon.ai.embeddings({"model": "string", "input": None}, idempotency_key="<unique-key>")