Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.randomseed.co/llms.txt

Use this file to discover all available pages before exploring further.

API key

Create your account on RandomSeed & grab your api key

Authentication

RandomSeed API uses your api key for authentication. Please do not share your api key! All API requests should include your API key in an Authorization HTTP header as follows:
Authorization: Bearer RANDOMSEED_API_KEY

Making requests

Copy & paste the code block below in your terminal to make your first request.
curl --location 'https://randomseed.lol/v1/sync/txt2img' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer $RANDOMSEED_API_KEY' \
  --data '{
      "txt2img": {
          "prompt": "Cute cat",
          "negative_prompt": "ugly, out of frame",
          "width": "512",
          "height": "512",
          "number_of_images": "1",
          "steps": "20",
          "cfg_scale": 7,
          "sampler_name": "Euler a",
          "seed": "-1",
          "model_name": "realistic_vision_v4",
      }
  }'
This makes a synchronous request to generate an image of a cat. You should get back a response that is like the following:
{
    "message": "image generated",
    "output": [
        "..."
    ]
}