const url = '<base-url>/api/v1/threads/<threadId>/artifacts/<index>/content';
const options = {method: 'GET', headers: {cookie: 'better-auth.session_token=<better-auth.session_token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));