Have a look at this thread:
In essence what you would need to do is something as follows using your own slug
/**
* project controller
*/
import { Core, factories } from "@strapi/strapi"
export default factories.createCoreController("api::project.project", ({ strapi }: { strapi: Core.Strapi }) => ({
async findOne(ctx) {
const { id } = ctx.params;
const sanitizedQueryParams = await this.sanitizeQuery(ctx);
const project = await strapi.documents("api::project.project").findMany({
...sanitizedQueryParams,
filters: { slug: id },
});
const sanitizedEntity = await this.sanitizeOutput(project[0], ctx);
return this.transformResponse(sanitizedEntity);
},
})
);