If a server URL includes a base like http://petstore.swagger.io/v1, snippets generated from it will include /v1:
const sdk = require('api')('https://example.com/openapi.json');
sdk.get('/v1/pets/petId')
.then(res => res.json())
.then(res => {
console.log(res);
});
This only a problem for operations that don't have an operation ID.