STOP WASTING PAID TOKENS. START POOLING ACCOUNTS TODAY. [ GET YOUR VAULT ]

Embeddings

POST /api/gate/v1/embeddings

Create Embeddings

Generate vector embeddings for one or more texts using an OpenAI embedding model or a SpiderGate alias (`agent/embed-small|large|embed). OpenAI-compatible — drop-in for the openai SDK's embeddings.create() with base_url='https://spideriq.ai/api/gate/v1'`. Metered + per-key-capped like the chat gate.

Request body

curl -X POST 'https://spideriq.ai/api/gate/v1/embeddings' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "agent/embed-small",
  "input": [
    "first text",
    "second text"
  ]
}'
import httpx

resp = httpx.post(
    "https://spideriq.ai/api/gate/v1/embeddings",
    headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
    json={"model": "agent/embed-small", "input": ["first text", "second text"]},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://spideriq.ai/api/gate/v1/embeddings", {
  method: "POST",
  headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
  body: JSON.stringify({"model": "agent/embed-small", "input": ["first text", "second text"]})
});
const data = await resp.json();
console.log(data);
package main

import (
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{"model": "agent/embed-small", "input": ["first text", "second text"]}`)
	req, _ := http.NewRequest("POST", "https://spideriq.ai/api/gate/v1/embeddings", body)
	req.Header.Set("Authorization", "Bearer <token>")
	req.Header.Set("Content-Type", "application/json")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}

Responses

  • 200 — Successful embedding

  • 400 — Invalid request

  • 401 — Authentication error

  • 429 — Rate limit exceeded

  • 500 — Internal error

  • 503 — No embeddings-capable OpenAI key available

  • 422 — Validation Error