You can call our models using the following API endpoint:
POST https://fastaitool.xyz/v1/models/{model_id}/predict
Parameter | Type | Description |
---|---|---|
model_id | string | The ID of the model to use |
input | object | Input data |
parameters | object | Optional model parameters |
// Using fetch API
fetch('https://fastaitool.xyz/v1/models/text-model/predict', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
input: {
text: "Hello, please introduce your service."
},
parameters: {
temperature: 0.7,
max_tokens: 100
}
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
// Process multiple inputs in batch
const inputs = [
"First question",
"Second question",
"Third question"
];
const requests = inputs.map(text =>
fetch('https://fastaitool.xyz/v1/models/text-model/predict', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
input: { text },
parameters: {
temperature: 0.5,
max_tokens: 50
}
})
}).then(res => res.json())
);
Promise.all(requests)
.then(results => console.log(results))
.catch(error => console.error('Error:', error));
We offer complete model private deployment solutions that can deploy models on your infrastructure according to your business needs, ensuring data security and privacy.
Provide professional inference performance acceleration services for specified models, optimize inference speed, reduce resource consumption, and enhance user experience.
Provide cost-effective model fine-tuning solutions to help you adapt general models to specific domains or tasks at a lower cost.
For details, please send an email to emotiversetech@gmail.com