NativeAds AI Environment Generations API

The Environment Generations API from NativeAds AI — 2 operation(s) for environment generations.

GitHub OpenAPI

Operations 2

POST /brands/{brandId}/environment-generations Create environment generation request #
GET /environment-generations/{id} Get environment generation by ID #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/nativeads-ai:nativeads-ai-environment-generations-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

nativeads-ai-environment-generations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: NativeAds Headless Environment Generations API
  version: 1.0.0
  description: 'The headless REST API for programmatic creative generation. Authenticate with a per-user API key (`Authorization: Bearer nak_...`). This reference lists only the endpoints an API key may call; generation endpoints are asynchronous (submit returns an id, then poll).'
  license:
    name: Commercial
    url: https://www.nativeads.ai/
servers:
- url: https://creative-v1.nativeads.ai/v1
  description: NativeAds API Server
security:
- BearerAuth: []
tags:
- name: Environment Generations
paths:
  /brands/{brandId}/environment-generations:
    post:
      summary: Create environment generation request
      description: 'Generate an environment image from a text prompt. This is an asynchronous operation

        that returns 202 Accepted. Poll the GET endpoint to check generation status.'
      operationId: createEnvironmentGeneration
      tags:
      - Environment Generations
      security:
      - BearerAuth: []
      parameters:
      - name: brandId
        in: path
        required: true
        description: Brand context for the generation
        schema:
          type: string
          format: uuid
        example: 223e4567-e89b-12d3-a456-426614174000
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentGenerationInput'
            example:
              prompt: A clean white studio with soft natural lighting
      responses:
        '202':
          description: Environment generation request accepted for asynchronous processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentGeneration'
        '400':
          description: Bad Request - Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Brand not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too Many Requests - Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /environment-generations/{id}:
    get:
      summary: Get environment generation by ID
      description: 'Retrieve environment generation details and status. Use this endpoint to poll

        for completion status after creating an environment generation.'
      operationId: getEnvironmentGeneration
      tags:
      - Environment Generations
      security:
      - BearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: Environment generation identifier
        schema:
          type: string
          format: uuid
        example: 123e4567-e89b-12d3-a456-426614174000
      responses:
        '200':
          description: Environment generation retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentGeneration'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Environment generation not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too Many Requests - Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    EnvironmentGenerationInput:
      type: object
      required:
      - prompt
      properties:
        prompt:
          type: string
          minLength: 1
          maxLength: 10000
          description: 'Environment description prompt for AI generation. Up to 10000 characters; a prompt longer

            than 2500 characters is condensed by the pipeline before the image model reads it.

            '
          example: A clean white studio with soft natural lighting
      additionalProperties: false
    AssetSummary:
      type: object
      required:
      - assetId
      - assetType
      - previewUrl
      - assetUrl
      properties:
        assetId:
          type: string
          format: uuid
          description: The ID of the asset.
        assetType:
          type: string
          enum:
          - image
          - logo
          - video
          - document
          - environment
          - font
          - mask
          - model
          - text
          - walmart_preview
        previewUrl:
          type:
          - string
          - 'null'
          format: url
          description: URL to the preview of the asset.
          example: https://cdn.example.com/assets/asset-123e4567-thumb.jpg
        assetUrl:
          type:
          - string
          - 'null'
          format: url
          description: URL to the asset.
          example: https://cdn.example.com/assets/asset-123e4567-img.jpg
        displayUrl:
          type:
          - string
          - 'null'
          format: url
          description: A screen-size rendition (2048 px long edge at most) for a full-screen viewer. Never the original file of a large image. Use the full URL only to download.
    GenerationStatus:
      type: string
      enum:
      - pending
      - processing
      - completed
      - failed
      description: Status of parent generation entity (environment generation or scene forge)
      example: pending
    ErrorError:
      type: object
      required:
      - code
      - message
      properties:
        code:
          type: string
          example: INVALID_REQUEST
        message:
          type: string
          example: Invalid input data provided
        details:
          description: "Additional error context (optional, can be object or array). Absent on\nmost errors; the message is the only guaranteed human-readable field.\n\nUpload rejections populate it, because a client needs to act on the\nanswer rather than parse it. `POST /v1/assets/initiate-upload` and\n`POST /v1/assets/confirm-upload` return:\n\n- `reason` — `unsupported_declared_type` when the declared MIME type is\n  not accepted, or `unsupported_file_contents` when the uploaded bytes\n  are a different format than declared (an AVIF saved with a `.jpg`\n  name, say). Only confirm-upload can report the second: it is the\n  first point that reads the real bytes.\n- `declaredType` — the MIME type the client sent.\n- `detectedFormat` — the format the bytes actually are, on\n  `unsupported_file_contents` only.\n- `supportedFormats` — every format an upload may be.\n- `retryable` — `false` on both, meaning the same bytes will be\n  rejected again. Clients must not retry these.\n"
          example:
            reason: unsupported_file_contents
            declaredType: image/jpeg
            detectedFormat: AVIF
            retryable: false
            supportedFormats:
            - DOC
            - DOCX
            - GIF
            - JPEG
            - MP4
            - PDF
            - PNG
            - QuickTime
            - TIFF
    EnvironmentGeneration:
      type: object
      required:
      - environmentGenerationId
      - brandId
      - prompt
      - status
      - createdAt
      - updatedAt
      properties:
        environmentGenerationId:
          type: string
          format: uuid
          readOnly: true
          description: Unique identifier for the environment generation
          example: 123e4567-e89b-12d3-a456-426614174000
        brandId:
          type: string
          format: uuid
          readOnly: true
          description: Brand context for the generation
          example: 223e4567-e89b-12d3-a456-426614174000
        prompt:
          type: string
          description: Environment description prompt used for generation
          example: A clean white studio with soft natural lighting
        status:
          $ref: '#/components/schemas/GenerationStatus'
        generatedAsset:
          type:
          - object
          - 'null'
          description: Generated environment asset (available when status is completed)
          allOf:
          - $ref: '#/components/schemas/AssetSummary'
        errorCode:
          type:
          - string
          - 'null'
          description: Error code if generation failed
          example: GENERATION_FAILED
        errorMessage:
          type:
          - string
          - 'null'
          description: Human-readable error message if generation failed
          example: Failed to generate environment from prompt
        createdAt:
          type: string
          format: date-time
          readOnly: true
          description: Creation timestamp
          example: '2024-01-01T00:00:00Z'
        updatedAt:
          type: string
          format: date-time
          readOnly: true
          description: Last update timestamp
          example: '2024-01-01T00:00:00Z'
        completedAt:
          type:
          - string
          - 'null'
          format: date-time
          readOnly: true
          description: Completion timestamp (null if not completed)
          example: '2024-01-01T00:05:30Z'
        failedAt:
          type:
          - string
          - 'null'
          format: date-time
          readOnly: true
          description: Failure timestamp (null if not failed)
          example: '2024-01-01T00:05:30Z'
    Error:
      description: Standard error response
      type: object
      required:
      - error
      - requestId
      properties:
        error:
          $ref: '#/components/schemas/ErrorError'
        requestId:
          type: string
          format: uuid
          description: Unique identifier for the request, useful for tracing.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token for authentication.