

In
Out


Text to Speech
const { OpenAI } = require('openai');
const main = async () => {
const api = new OpenAI({ apiKey: '', baseURL: 'https://api.ai.cc/v1' });
const text = 'Your text string goes here';
const response = await api.embeddings.create({
input: text,
model: 'togethercomputer/m2-bert-80M-2k-retrieval',
});
const embedding = response.data[0].embedding;
console.log(embedding);
};
main();
import json
from openai import OpenAI
def main():
client = OpenAI(
base_url="https://api.ai.cc/v1",
api_key="",
)
text = "Your text string goes here"
response = client.embeddings.create(input=text, model="togethercomputer/m2-bert-80M-2k-retrieval")
embedding = response.data[0].embedding
print(json.dumps(embedding, indent=2))
main()

Product Detail
AI Playground
Test all API models in the sandbox environment before you integrate. We provide more than 300 models to integrate into your app.
Try For Free



Log in