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.
DiscordPlatform
DocumentationIntegrationsAPI referenceSDKsChangelog
DocumentationIntegrationsAPI referenceSDKsChangelog
  • API Reference
      • POSTCreate embeddings
      • POSTSpeech to text
      • POSTText to speech
      • GETRetrieve AssemblyAI transcript
  • Reference
    • Filters API Reference
LogoLogo
DiscordPlatform
API ReferenceMultimodal

Create embeddings

POST
https://api.respan.ai/api/embeddings
POST
/api/embeddings
$curl -X POST https://api.respan.ai/api/embeddings \
> -H "Authorization: Bearer sk_live_xxxxx" \
> -H "Content-Type: application/json" \
> -d '{
> "model": "text-embedding-3-small",
> "input": "The quick brown fox jumps over the lazy dog"
>}'
1{
2 "object": "list",
3 "data": [
4 {
5 "object": "embedding",
6 "embedding": [
7 0.012,
8 0.034,
9 0.056,
10 0.078,
11 0.099,
12 0.123,
13 0.145,
14 0.167,
15 0.189,
16 0.21,
17 0.232,
18 0.254,
19 0.276,
20 0.298,
21 0.32,
22 0.342,
23 0.364,
24 0.386,
25 0.408,
26 0.43,
27 0.452,
28 0.474,
29 0.496,
30 0.518,
31 0.54,
32 0.562,
33 0.584,
34 0.606,
35 0.628,
36 0.65,
37 0.672,
38 0.694,
39 0.716,
40 0.738,
41 0.76,
42 0.782,
43 0.804,
44 0.826,
45 0.848,
46 0.87,
47 0.892,
48 0.914,
49 0.936,
50 0.958,
51 0.98,
52 1.002,
53 1.024,
54 1.046,
55 1.068,
56 1.09
57 ],
58 "index": 0
59 }
60 ],
61 "model": "text-embedding-3-small",
62 "usage": {
63 "prompt_tokens": 9,
64 "total_tokens": 9
65 }
66}
Create embeddings through the Respan gateway with automatic logging.
Was this page helpful?
Previous

Speech to text

Next
Built with

Headers

AuthorizationstringRequired

Bearer token. Use Bearer YOUR_API_KEY.

X-Data-Respan-ParamsstringOptional

Base64-encoded JSON object of Respan parameters. Legacy X-Data-Keywordsai-Params is still accepted.

Request

This endpoint expects an object.
modelenumRequired
Embedding model ID.
Allowed values:
inputanyRequired
Text to embed. String or array of strings.
encoding_formatenumOptionalDefaults to float
Output format.
Allowed values:
dimensionsintegerOptional

Output embedding dimensions. Only supported by text-embedding-3-* models.

customer_credentialsobjectOptional

Per-customer LLM provider credentials.

disable_logbooleanOptionalDefaults to false

When true, omits input/output from the log. Metrics still recorded.

metadataobjectOptional

Custom key-value metadata.

customer_identifierstringOptional
End user identifier.
thread_identifierstringOptional
Conversation thread ID.

Response

Embedding results.
objectstring
datalist of objects
modelstring
usageobject

Errors

401
Unauthorized Error