const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
input: '<string>',
encoding_format: 'float',
dimensions: 2,
provider_options: {
google: {task_type: '<string>', title: '<string>'},
mistral: {output_dtype: 'float'}
},
user: '<string>',
debug: {
enabled: true,
return_upstream_request: true,
return_upstream_response: true,
trace: true,
trace_level: 'summary'
},
provider: {
order: ['<string>'],
only: ['<string>'],
ignore: ['<string>'],
include_alpha: true
}
})
};
fetch('https://api.phaseo.app/v1/embeddings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));