Sure! Here's an example API code in Python to find the next prime number:

```
def is_prime(n):
    """
    Check if given number is prime
    """
    if n <= 1:
        return False
    for i in range(2, int(n**0.5)+1):
        if n % i == 0:
            return False
    return True
    
def next_prime(n):
    """
    Find the next prime number after n
    """
    p = n + 1
    while not is_prime(p):
        p += 1
    return p
```
Scrivi un'API per trovare il prossimo numero primo