Embeddings
Scope notes. /v1/embeddings does not have a /min{N} minimum-discount mirror, and secret masking is not applied on this route (x-si-secret-masking: not_applied).
OpenAI-compatible text embeddings routed to the cheapest healthy seller for the model. See Media Capabilities and Contracts for canonical parameter rules and response headers.
Request
Auth: API key (Authorization: Bearer inf_***), or pay-per-request via x402 (PAYMENT-SIGNATURE). With no auth, the endpoint returns 402 advertising x402. See Buyer endpoints.
modelstringrequiredEmbedding model ID, e.g.venice-embed-1. QueryGET /v1/models?type=embeddingfor the live cataloginputstring | string[]requiredSingle text string or array of strings to embedencoding_formatstringfloat(default) orbase64dimensionsintegerOptional output vector dimensionality when supported by the modelproviderstring | string[]Optional provider pin (see Routing Controls)providers_blockedstring | string[]Providers excluded from routing
Response headers include unconditional X-Request-Id and X-SI-Model-Alias (when an alias resolves), sync-only X-SI-Adapted-Params (when params are adapted or stripped), and mutually exclusive rollout-gated headers X-SI-Resolved-Params (MEDIA_STANDARDIZATION_MODE=enforce only) or X-SI-Deprecation (MEDIA_STANDARDIZATION_MODE=shadow only for unknown/unhonored params).
curl $SURPLUS_BASE_URL/embeddings \ -H "Authorization: Bearer inf_***" \ -H "Content-Type: application/json" \ -d '{ "model": "venice-embed-1", "input": ["Surplus Intelligence inference marketplace"], "encoding_format": "float" }'
{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [0.0023, -0.0091, 0.0154]
}
],
"model": "venice-embed-1",
"usage": {
"prompt_tokens": 6,
"total_tokens": 6
}
}Pricing and Metering
Embeddings are token-metered ($/1M tokens × winning seller discount) and settled in USDC microdollars (1 USD = 1,000,000 microdollars). When the provider reports usage.prompt_tokens (or usage.total_tokens), billing reconciles against reported usage within the sanity floor; otherwise billing uses the request token estimate.
Errors
| Status | Code | When |
|---|---|---|
400 | invalid_request | Malformed request body or missing model/input |
400 | unsupported_parameter | Unknown parameter key sent for the embeddings modality |
402 | insufficient_credit / insufficient_balance / insufficient_allowance | Account balance cannot cover the request |
404 | model_not_found | Model ID is not in the catalog |
404 | no_sellers_for_model | No listed seller serves this model on this endpoint |
502 | provider_error | Upstream provider failed after healthy failover candidates were exhausted |
503 | sellers_unavailable / no_healthy_sellers | No candidate seller is currently healthy or available (retryable) |
400Code · invalid_requestWhen · Malformed request body or missing model/input400Code · unsupported_parameterWhen · Unknown parameter key sent for the embeddings modality402Code · insufficient_credit / insufficient_balance / insufficient_allowanceWhen · Account balance cannot cover the request404Code · model_not_foundWhen · Model ID is not in the catalog404Code · no_sellers_for_modelWhen · No listed seller serves this model on this endpoint502Code · provider_errorWhen · Upstream provider failed after healthy failover candidates were exhausted503Code · sellers_unavailable / no_healthy_sellersWhen · No candidate seller is currently healthy or available (retryable)