File Uploads

Our SDKs currently support sync file uploads. Async support is coming soon.

const OneAI = require("oneai");

const oneai = new OneAI("<YOUR-API-KEY-HERE>");

const file = new oneai.File("<PATH-TO-YOUR-FILE>");

const pipeline = new oneai.Pipeline(
    oneai.skills.summarize(),
);

pipeline.run(file).then(console.log);
import oneai

oneai.api_key = "<YOUR-API-KEY-HERE>"
file = oneai.File("<PATH-TO-FILE>")

pipeline = oneai.Pipeline(
  steps = [
        oneai.skills.Summarize(),
  ]
)

output = pipeline.run(file)

Did this page help you?