> For the complete documentation index, see [llms.txt](https://nsclouds.gitbook.io/aillm.nscloud.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nsclouds.gitbook.io/aillm.nscloud.ai/image-generations/volcengine.md).

# Volcengine

### 1. Overview

Volcengine exposes image generation capabilities in this environment.

{% hint style="success" %}
This endpoint provides an OpenAI-compatible Images path. Actual capabilities may vary by vendor and model.
{% endhint %}

**Supported models：**

* `doubao-seedream-4-5-251128`
* `doubao-seedream-5-0-260128`

### 2. API Details

## Generate image

> Provides an OpenAI-compatible Images generation endpoint. Supported capabilities may vary by model.

```json
{"openapi":"3.1.0","info":{"title":"NSCloud AI API Documentation","version":"1.11.0"},"tags":[{"name":"image_generations_volcengine","description":"Volcengine's image generations API"}],"servers":[{"url":"https://aillm.nscloud.ai","description":"Global Server"}],"security":[{"APIKeyHeader":[]}],"components":{"securitySchemes":{"APIKeyHeader":{"type":"http","scheme":"bearer","description":"Authenticate using Bearer token format: 'Bearer YOUR_SECRET_TOKEN'"}},"schemas":{"CreateImageGenerationRequest":{"type":"object","description":"Image generation request body.","properties":{"model":{"type":"string","description":"Model ID to invoke."},"prompt":{"type":"string","description":"Prompt used to generate the image."},"n":{"type":"integer","description":"Number of images to generate.","default":1},"size":{"type":"string","description":"Requested output image size.","default":"1024x1024"},"quality":{"type":"string","description":"Requested image quality level.","enum":["standard","hd"],"default":"standard"},"response_format":{"type":"string","description":"Format used to return the image payload.","enum":["url","b64_json"],"default":"url"}},"required":["model","prompt"]},"ImageResponse":{"type":"object","description":"Image generation or edit success response.","properties":{"created":{"type":"integer","description":"Unix timestamp in seconds when the response was created."},"data":{"type":"array","description":"Generated image results.","items":{"$ref":"#/components/schemas/ImageDataItem"}},"background":{"type":"string","description":"Background type used for the generated image."},"output_format":{"type":"string","description":"Output image format, such as png."},"quality":{"type":"string","description":"Effective image quality used by the model."},"size":{"type":"string","description":"Final returned image size."},"usage":{"$ref":"#/components/schemas/ImageUsage"}}},"ImageDataItem":{"type":"object","description":"A single generated image result.","properties":{"url":{"type":"string","description":"Image URL when response_format=url."},"b64_json":{"type":"string","description":"Base64-encoded image bytes when response_format=b64_json."},"revised_prompt":{"type":"string","description":"Prompt actually used or revised by the model."}}},"ImageUsage":{"type":"object","description":"Resource usage summary for image generation.","properties":{"total_tokens":{"type":"integer","description":"Total token count."},"input_tokens":{"type":"integer","description":"Input token count."},"output_tokens":{"type":"integer","description":"Output token count."},"input_tokens_details":{"type":"object","description":"Optional breakdown of input token usage.","properties":{"text_tokens":{"type":"integer","description":"Input tokens attributed to text prompts."},"image_tokens":{"type":"integer","description":"Input tokens attributed to images."}},"additionalProperties":true}}},"ErrorResponse":{"type":"object","description":"Error response payload.","properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"ErrorDetail":{"type":"object","description":"Error detail object.","properties":{"message":{"type":"string","description":"Human-readable error message."},"type":{"type":"string","description":"Error type."},"param":{"description":"Parameter associated with the error, if any.","type":["string","null"]},"code":{"description":"Machine-readable error code, if any.","type":["string","null"]}}}},"responses":{"ErrorResponse":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v1/images/generations":{"post":{"tags":["image_generations_volcengine"],"summary":"Generate image","description":"Provides an OpenAI-compatible Images generation endpoint. Supported capabilities may vary by model.","operationId":"createImage_volcengine","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateImageGenerationRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageResponse"}}}},"400":{"$ref":"#/components/responses/ErrorResponse"},"401":{"$ref":"#/components/responses/ErrorResponse"},"429":{"$ref":"#/components/responses/ErrorResponse"}}}}}}
```
