Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 error with segmentAnything2 call? #29

Open
roschler opened this issue Sep 28, 2024 · 0 comments
Open

404 error with segmentAnything2 call? #29

roschler opened this issue Sep 28, 2024 · 0 comments
Assignees

Comments

@roschler
Copy link

roschler commented Sep 28, 2024

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:

		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:

	const livepeer = new Livepeer({
		apiKey: process.env.LIVEPEER_API_KEY,
		serverURL: "https://livepeer.studio/api/beta/generate/segment-anything-2"
	});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants