ZvenoAI
API Reference

Create Image Generation (OpenAI path)

POST
/v1/images/generations

Тот же запрос, что POST /v1/images, по пути OpenAI Images API: сюда шлёт client.images.generate() из OpenAI SDK при base_url: "https://api.zveno.ai/v1". Тело, ответы и списание совпадают с POST /v1/images.

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:8080/v1/images/generations" \  -H "Content-Type: application/json" \  -d '{    "model": "string",    "prompt": "string",    "property1": null,    "property2": null  }'
{
  "id": "string",
  "created": 0,
  "data": [
    {
      "b64_json": "string",
      "media_type": "string"
    }
  ],
  "usage": {
    "prompt_tokens": 0,
    "completion_tokens": 0,
    "total_tokens": 0,
    "cost": 0.1
  }
}
{
  "error": {
    "code": 0,
    "message": "string",
    "metadata": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": 0,
    "message": "string",
    "metadata": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": 0,
    "message": "string",
    "metadata": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": 0,
    "message": "string",
    "metadata": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": 0,
    "message": "string",
    "metadata": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": 0,
    "message": "string",
    "metadata": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": 0,
    "message": "string",
    "metadata": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": 0,
    "message": "string",
    "metadata": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": 0,
    "message": "string",
    "metadata": {
      "property1": null,
      "property2": null
    }
  }
}