Basic usage
Basic usage
Each feature extraction model is different, so check readme.md for the model manual. Below is an example of text embedding model
import Bytez from 'bytez.js';
// insert your key
const sdk = new Bytez('BYTEZ_KEY');
// choose your model
const model = sdk.model('nomic-ai/nomic-embed-text-v1.5');
// provide the model with input
const input = "search_document: Turn this text into a vector";
// send to the model
const { error, output } = await model.run(input);
// observe the output
console.log({ error, output });
from bytez import Bytez
# insert your key
sdk = Bytez("BYTEZ_KEY")
# choose your model
model = sdk.model("nomic-ai/nomic-embed-text-v1.5")
# provide the model with input
input = "search_document: Turn this text into a vector"
# send to the model
result = model.run(input)
# observe the output
print({"error": result.error, "output": result.output})
curl -X POST 'https://api.bytez.com/models/v2/nomic-ai/nomic-embed-text-v1.5' \
-H 'Authorization: BYTEZ_KEY' \
-H 'Content-Type: application/json' \
--data '{
"text": "search_document: Turn this text into a vector"
}'