Basic usage
Basic usage
Send a text input to classify individual tokens
import Bytez from 'bytez.js';
// insert your key
const sdk = new Bytez('BYTEZ_KEY');
// choose your model
const model = sdk.model('dslim/bert-base-NER');
// provide the model with input
const input = "John Doe is a software engineer at Google";
// 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("dslim/bert-base-NER")
# provide the model with input
input = "John Doe is a software engineer at Google"
# 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/dslim/bert-base-NER' \
-H 'Authorization: BYTEZ_KEY' \
-H 'Content-Type: application/json' \
--data '{
"text": "John Doe is a software engineer at Google"
}'