livepeer / livepeer/livepeer-js
404 error with segmentAnything2 call?
- 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
Assessment
This issue has not been assessed yet.