Source: https://docs.sogni.ai/api-reference/

REST API/api.sogni.ai

# Your next idea  
has an API.

Images, video, music, and agent workflows, in your stack and behind your interface. Make something we wouldn't have thought of.

[Get an API key](https://dashboard.sogni.ai/api-key)[Read the conventions](https://docs.sogni.ai/api-reference/getting-started/)

[![Sogni's pink sloth in glasses and a black work jacket, making things in a rain-lit studio with a synthesizer and GPU computer.](https://docs.sogni.ai/assets/api-mascot-studio-v1-1536.webp)](https://docs.sogni.ai/assets/api-mascot-studio-v1-1536.webp)

Independent minds. After hours. [Artwork made with Sogni](https://docs.sogni.ai/api-reference/direct-generation/)

Your first call One request. The model picks up Sogni's creative tools and returns an image URL.

```bash
curl https://api.sogni.ai/v1/chat/completions \
  -H "Authorization: Bearer $SOGNI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      { "role": "user", "content": "Generate a cinematic image of a neon alley in Tokyo during rain." }
    ]
  }'
```

The [Supernet](https://docs.sogni.ai/run-a-worker/fast-worker/about-sogni-fast-worker/) runs on GPU capacity contributed by independent operators, including people running hardware at home. People-powered compute, for people with their own ideas.

New here? Start with [authentication and conventions](https://docs.sogni.ai/api-reference/getting-started/). Already building? Pick your next move below. Every endpoint shows its full versioned path; you'll see `/v1`, `/v2`, and `/v4` resources here.

**Before you hit send.** Public reads and account operations have different access rules. Check authentication before you call, keep API keys on your server, and give polling requests room to breathe.
