POST /v1/images/generations
Generates one or more images from a text prompt. Request and response schema follow the OpenAI Images API v1 format — an existing client pointed at https://api.sognix.com with a valid Sogni API key requires no other changes.
Base URL
https://api.sognix.com
Authentication
Pass your API key in the Authorization header as a Bearer token: Authorization: Bearer sgn_.... Keys are generated in your account dashboard under Settings → API Keys.
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID. See /v1/models for available models. |
prompt | string | Yes | Text description of the desired image. Up to 2000 characters. |
size | string | No | Output resolution: 512x512, 1024x1024, 2048x2048. Default: 1024x1024. |
n | integer | No | Number of images to generate. 1–10. Default: 1. |
response_format | string | No | url (default) or b64_json. |
Response
{
"created": 1700000000,
"data": [
{ "url": "https://cdn.sognix.com/out/abc123.webp" }
]
}
GET /v1/models
Returns the list of models currently online across the network, with each model's availability status, supported resolution range, and required VRAM tier. Use this endpoint to confirm a specific model ID before submitting a generation job.
POST /v1/videos/generations
Generates a short video clip from a text prompt or a seed image. Runs on Wan-Video and compatible video diffusion models. The job is asynchronous — the response returns a job ID, which you poll at GET /v1/videos/jobs/{id} until status is completed, then retrieve the output URL.
GET /v1/account/credits
Returns the authenticated account's current credit balance, monthly allocation, credits consumed this billing period, and any add-on credit balance. Use this to implement usage gates in your application before dispatching generation jobs.