Does anyone know how to get the image url from the $meta object of another generator? I think there’s an /api/ fetch I can do for it, but that stuff isn’t documented anywhere, I don’t think.

  • VioneTM
    link
    English
    2
    edit-2
    16 days ago

    The endpoint for getting the generator stats/metadata is https://perchance.org/api/getGeneratorStats?names={names}, it would return a list of data based on the generator names inputted and it would give a metadata property per generator that you can access.

    Here is an example of using it: https://perchance.org/generator-list-with-stats-2-template#edit

    • @wthit56OP
      link
      English
      215 days ago

      Ah cool… thanks!

      Do you know if there’s anywhere documenting /api/? Or at least listing endpoints/params so I can test and write my own docs for it?

      • VioneTM
        link
        English
        3
        edit-2
        15 days ago

        No, I don’t think there is. The public ones that I’ve seen are:

        • @wthit56OP
          link
          English
          115 days ago

          Great thanks!

          And of course with the new tags $meta property, there’s also api/getGeneratorList?tags=foo ref

    • @wthit56OP
      link
      English
      115 days ago

      Ah great! I just noticed this but the apis on that tutorial page only just showed up. I’ll be trying them out!

    • @wthit56OP
      link
      English
      115 days ago

      I don’t suppose you could add an id to that <h2> could you? So we can link people direct to that section? 😉