Content - TypeScript SDK

Content type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

Supported Types

operations.ContentText

1const value: operations.ContentText = {
2 text: "<value>",
3 type: "text",
4};

operations.ContentImageURL

1const value: operations.ContentImageURL = {
2 imageUrl: {
3 url: "https://zealous-march.biz/",
4 },
5 type: "image_url",
6};

models.ContentPartInputAudio

1const value: models.ContentPartInputAudio = {
2 inputAudio: {
3 data: "data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAA...",
4 },
5 type: "input_audio",
6};

models.ContentPartInputVideo

1const value: models.ContentPartInputVideo = {
2 inputVideo: {
3 data: "data:video/mp4;base64,AAAAGGZ0eXBtcDQyAAAAAGlzb21tcDQy...",
4 },
5 type: "input_video",
6};

models.ContentPartInputFile

1const value: models.ContentPartInputFile = {
2 inputFile: {
3 data: "data:application/pdf;base64,JVBERi0xLjQKJeLjz9MKMyAw...",
4 },
5 type: "input_file",
6};