Setting pages for posts

Solutions is to add a $page entering value to the function and in the curl route that represents the page number to end up with a route like this

curl -i websitename/wp-json/posts/page_number

where $page is page_number

    public function posts($page){
         $args = array(
        'author'   => $id,         
        'posts_per_page'   => 24,         
        'offset'           => 0,
        'meta_key'         => $meta_key,
        'orderby'          => $orderby,
        'order'            => 'DESC', 
        'paged'           => $page,
        'post_type'        => 'videos',
        'post_status'      => 'publish',
         'suppress_filters' => true );