import Morphik from 'morphik';
const client = new Morphik({
apiKey: 'My API Key',
});
const modelResponse = await client.models.create({
config: { foo: 'bar' },
name: 'name',
provider: 'provider',
});
console.log(modelResponse.id);
{
"id": "<string>",
"name": "<string>",
"provider": "<string>",
"config": {},
"created_at": "<string>",
"updated_at": "<string>"
}
Save a custom model configuration.
import Morphik from 'morphik';
const client = new Morphik({
apiKey: 'My API Key',
});
const modelResponse = await client.models.create({
config: { foo: 'bar' },
name: 'name',
provider: 'provider',
});
console.log(modelResponse.id);
{
"id": "<string>",
"name": "<string>",
"provider": "<string>",
"config": {},
"created_at": "<string>",
"updated_at": "<string>"
}
Request to save a custom model.
Successful Response
Response for a saved model.
Was this page helpful?