livepeer / livepeer/livepeer-js

404 error with segmentAnything2 call?

Open
#29 0 comments 0 reactions 2 assignees Claimed by @victorges View on GitHub
Dominant language
TypeScript
Stars
9
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Flo on the Discord server was kind enough to point out that the URL coming back in the error response doesn't look right. As you can see "/api" is duplicated:
```
url: 'https://livepeer.studio/api/api/beta/generate/segment-anything-2'
```

At first, I was not passing in a URL, just calling the `livepeer-js` segmentAnything2() function like this:
```ts
const result =
await livepeer.generate.segmentAnything2({
image: imageBodyGenSAM2,
modelId: DEFAULT_SEGMENT_ANYTHING_MODEL_ID
});
```

So is livepeer-js building that URL improperly?

Flo on the Discord then showed me how to specify a specific server URL:
```ts
const livepeer = new Livepeer({
apiKey: process.env.LIVEPEER_API_KEY,
serverURL: "https://livepeer.studio/api/beta/generate/segment-anything-2"
});
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.