openapi: 3.1.0
info:
  title: OpenAI GPT LLMs through GENGEN
  version: 1.1.0
servers:
  - url: https://gengen.farm/api/gengen/v1
security:
  - bearerAuth: []
paths:
  /models:
    get:
      operationId: listGengenChatModels
      summary: List public chat models
      description: OpenAI-compatible discovery of visible GENGEN chat models, including GPT.
        Requires a GENGEN API key but no positive wallet balance. Free, with no upstream
        generation calls. Media-only, hidden and gated models are excluded. Also available at /v1/models.
      responses:
        "200":
          description: Complete model list, without pagination. Private and uncached.
          content:
            application/json:
              schema:
                type: object
                required: [object, data]
                properties:
                  object:
                    type: string
                    const: list
                  data:
                    type: array
                    items:
                      type: object
                      required: [id, object, created, owned_by]
                      properties:
                        id:
                          type: string
                        object:
                          type: string
                          const: model
                        created:
                          type: integer
                          description: Unix creation timestamp in seconds; zero when unavailable.
                        owned_by:
                          type: string
                          description: Public provider identifier.
        "401":
          description: Missing or invalid GENGEN API key.
        "403":
          description: Revoked or expired GENGEN API key.
        "500":
          description: API key validation unavailable.
  /responses/compact:
    post:
      operationId: compactOpenAIGPTContext
      summary: Compact a GPT conversation
      description: Non-streaming context compaction with caller-owned references and measured token billing.
        Settlement precedes delivery. Retained historical tool calls are not charged again.
        Standard processing only; do not automatically retry ambiguous submissions.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GPTCompactRequest"
            example:
              model: gpt-6.1-sol
              input:
                - role: user
                  content: Summarize the project context for continuation.
      responses:
        "200":
          description: Native compacted window; use the complete output as input to the next response.
          content:
            application/json:
              schema:
                type: object
                required: [id, object, created_at, output, usage]
                properties:
                  id:
                    type: string
                  object:
                    type: string
                    const: response.compaction
                  created_at:
                    type: integer
                  output:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                  usage:
                    type: object
                    additionalProperties: true
        "400":
          description: Invalid input, unsupported model, processing tier, or compact option.
        "401":
          description: Missing or invalid GENGEN API key.
        "402":
          description: Insufficient model-eligible wallet balance.
        "403":
          description: Revoked or expired GENGEN API key.
        "404":
          description: A referenced response or resource is not owned by this API key.
        "413":
          description: Request body exceeds the size limit.
        "502":
          description: Provider or usage reconciliation failure; no compacted window is delivered.
  /responses:
    post:
      operationId: createOpenAIGPTResponse
      summary: Generate GPT responses with reasoning and tools
      description: Native OpenAI Responses with owned stored/background state, Code Interpreter, hosted shell,
        Files, File Search, containers, image generation, MCP and client tools. Wallet settlement precedes
        terminal delivery. Standard processing only.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GPTResponseRequest"
            example:
              model: gpt-6.1-sol
              input: Research battery recycling and cite sources.
              tools:
                - type: web_search
              reasoning:
                effort: medium
              store: false
              max_output_tokens: 4096
      responses:
        "200":
          description: Native response object, or typed SSE events. Wallet settlement precedes terminal delivery.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GPTResponse"
            text/event-stream:
              schema:
                type: string
                description: Native Responses SSE. Ends with response.completed, response.incomplete, or response.failed;
                  local failures emit error.
        "202":
          description: Hosted foreground work continues in the background; poll the Location header.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GPTResponse"
        "400":
          description: Invalid model option, unsupported tool, stored resource reference, or incompatible
            reasoning/sampling setting.
        "401":
          description: Invalid GENGEN API key.
        "402":
          description: Insufficient model-eligible wallet balance.
        "409":
          description: Idempotency conflict, operation already submitting, or unfinalized dependency.
        "429":
          description: Upstream rate limit.
        "502":
          description: Provider or usage reconciliation failure; generation is never retried automatically.
      parameters:
        - in: header
          name: Idempotency-Key
          schema:
            type: string
            maxLength: 200
          description: Use a stable key for replay-safe stored/hosted creates. Another payload with the same key returns
            HTTP 409.
  /chat/completions:
    post:
      operationId: createOpenAIGPTChatCompletion
      summary: Generate GPT Chat Completions
      description: Native Chat Completions with text/image messages and structured outputs. Astra and Sol 6.1
        require Responses for tools. Sol and Luna support function tools only with reasoning_effort none.
        Standard processing, store false and n 1 only.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GPTChatRequest"
            example:
              model: gpt-6-luna
              messages:
                - role: user
                  content: Explain idempotency briefly.
              max_completion_tokens: 1024
      responses:
        "200":
          description: Native Chat Completion or SSE chunks. Finish/usage chunks and DONE follow wallet settlement.
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - choices
                  - usage
                properties:
                  id:
                    type: string
                  object:
                    const: chat.completion
                  model:
                    type: string
                  choices:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                  usage:
                    type: object
                    additionalProperties: true
                additionalProperties: true
            text/event-stream:
              schema:
                type: string
        "400":
          description: Unsupported model, tool, reasoning, sampling, tier, or resource reference.
        "401":
          description: Invalid GENGEN API key.
        "402":
          description: Insufficient model-eligible wallet balance.
        "429":
          description: Upstream rate limit.
        "502":
          description: Provider or usage reconciliation failure.
  /files:
    get:
      operationId: listOwnedFiles
      summary: List owned file metadata snapshots
      parameters: &a3
        - &a7
          name: limit
          in: query
          schema:
            type: integer
        - &a8
          name: after
          in: query
          schema:
            type: string
        - &a9
          name: before
          in: query
          schema:
            type: string
        - &a10
          name: order
          in: query
          schema:
            type: string
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: &a1
                type: object
                additionalProperties: true
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
    post:
      operationId: createOwnedFile
      summary: Create owned file
      parameters:
        - &a4
          name: Idempotency-Key
          in: header
          schema:
            type: string
            maxLength: 200
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
                - purpose
              properties:
                file:
                  type: string
                  format: binary
                  description: Maximum 4 MB including multipart fields.
                purpose:
                  type: string
                  enum:
                    - assistants
                    - user_data
                    - vision
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "402":
          description: Insufficient eligible wallet balance.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
  /files/{resource_id}:
    get:
      operationId: getOwnedFile
      summary: Retrieve owned file
      parameters: &a2
        - name: resource_id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
    delete:
      operationId: deleteOwnedFile
      summary: Delete owned file
      parameters: *a2
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
  /containers:
    get:
      operationId: listOwnedContainers
      summary: List owned container metadata snapshots
      parameters: *a3
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
    post:
      operationId: createOwnedContainer
      summary: Create owned container
      parameters:
        - *a4
      requestBody:
        required: true
        content:
          application/json:
            schema: *a1
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "402":
          description: Insufficient eligible wallet balance.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
  /containers/{resource_id}:
    get:
      operationId: getOwnedContainer
      summary: Retrieve owned container
      parameters: &a5
        - &a6
          name: resource_id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
    delete:
      operationId: deleteOwnedContainer
      summary: Delete owned container
      parameters: *a5
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
  /containers/{resource_id}/files:
    get:
      operationId: listOwnedContainerFiles
      summary: List files in an owned resource
      parameters:
        - *a6
        - *a7
        - *a8
        - *a9
        - *a10
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
    post:
      operationId: attachOwnedContainerFile
      summary: Attach an owned File to an owned resource
      parameters:
        - *a6
        - *a4
      requestBody:
        required: true
        content:
          application/json:
            schema: *a1
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
  /containers/{resource_id}/files/{file_id}:
    get:
      operationId: getOwnedContainerFile
      summary: Retrieve owned resource file
      parameters:
        - *a6
        - name: file_id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
    delete:
      operationId: deleteOwnedContainerFile
      summary: Delete owned resource file
      parameters:
        - *a6
        - name: file_id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
  /vector_stores:
    get:
      operationId: listOwnedVectorStores
      summary: List owned vectorstore metadata snapshots
      parameters: *a3
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
    post:
      operationId: createOwnedVectorStore
      summary: Create owned vectorstore
      parameters:
        - *a4
      requestBody:
        required: true
        content:
          application/json:
            schema: *a1
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "402":
          description: Insufficient eligible wallet balance.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
  /vector_stores/{resource_id}:
    get:
      operationId: getOwnedVectorStore
      summary: Retrieve owned vectorstore
      parameters: &a11
        - &a12
          name: resource_id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
    delete:
      operationId: deleteOwnedVectorStore
      summary: Delete owned vectorstore
      parameters: *a11
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
    post:
      operationId: updateOwnedVectorStore
      summary: Update name, description or metadata
      parameters:
        - *a12
        - *a4
      requestBody:
        required: true
        content:
          application/json:
            schema: *a1
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
  /vector_stores/{resource_id}/files:
    get:
      operationId: listOwnedVectorStoreFiles
      summary: List files in an owned resource
      parameters:
        - *a12
        - *a7
        - *a8
        - *a9
        - *a10
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
    post:
      operationId: attachOwnedVectorStoreFile
      summary: Attach an owned File to an owned resource
      parameters:
        - *a12
        - *a4
      requestBody:
        required: true
        content:
          application/json:
            schema: *a1
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
  /vector_stores/{resource_id}/files/{file_id}:
    get:
      operationId: getOwnedVectorStoreFile
      summary: Retrieve owned resource file
      parameters:
        - *a12
        - name: file_id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
    delete:
      operationId: deleteOwnedVectorStoreFile
      summary: Delete owned resource file
      parameters:
        - *a12
        - name: file_id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
    post:
      operationId: updateOwnedVectorFile
      summary: Update indexed file attributes
      parameters:
        - name: resource_id
          in: path
          required: true
          schema:
            type: string
        - name: file_id
          in: path
          required: true
          schema:
            type: string
        - *a4
      requestBody:
        required: true
        content:
          application/json:
            schema: *a1
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
  /files/{resource_id}/content:
    get:
      operationId: downloadOwnedFile
      summary: Download owned file
      parameters:
        - name: resource_id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200": &a13
          description: Private file content.
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        "404":
          description: File or parent is not owned by this key or has expired.
  /containers/{resource_id}/files/{file_id}/content:
    get:
      operationId: downloadOwnedContainerFile
      summary: Download owned file
      parameters:
        - name: resource_id
          in: path
          required: true
          schema:
            type: string
        - name: file_id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200": *a13
        "404":
          description: File or parent is not owned by this key or has expired.
  /vector_stores/{resource_id}/search:
    post:
      operationId: searchOwnedVectorStore
      summary: Search owned vector store
      parameters:
        - name: resource_id
          in: path
          required: true
          schema:
            type: string
        - *a4
      requestBody:
        required: true
        content:
          application/json:
            schema: *a1
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "402":
          description: Insufficient eligible wallet balance.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
  /vector_stores/{resource_id}/file_batches:
    post:
      operationId: ownedCreatefilebatch
      summary: Create file batch
      parameters:
        - name: resource_id
          in: path
          required: true
          schema:
            type: string
        - *a4
      requestBody:
        required: true
        content:
          application/json:
            schema: *a1
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
  /vector_stores/{resource_id}/file_batches/{batch_id}:
    get:
      operationId: ownedRetrievefilebatch
      summary: Retrieve file batch
      parameters:
        - name: resource_id
          in: path
          required: true
          schema:
            type: string
        - name: batch_id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
  /vector_stores/{resource_id}/file_batches/{batch_id}/files:
    get:
      operationId: ownedListbatchfiles
      summary: List batch files
      parameters:
        - name: resource_id
          in: path
          required: true
          schema:
            type: string
        - name: batch_id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
  /vector_stores/{resource_id}/file_batches/{batch_id}/cancel:
    post:
      operationId: ownedCancelfilebatch
      summary: Cancel file batch
      parameters:
        - name: resource_id
          in: path
          required: true
          schema:
            type: string
        - name: batch_id
          in: path
          required: true
          schema:
            type: string
        - *a4
      requestBody:
        required: true
        content:
          application/json:
            schema: *a1
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
  /responses/{response_id}:
    get:
      operationId: retrieveOwnedGPTResponse
      summary: Retrieve or resume an owned response
      parameters:
        - &a14
          name: response_id
          in: path
          required: true
          schema:
            type: string
        - name: stream
          in: query
          schema:
            type: boolean
        - name: starting_after
          in: query
          schema:
            type: integer
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
    delete:
      operationId: deleteOwnedGPTResponse
      summary: Delete a finalized owned response
      parameters: &a15
        - *a14
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
  /responses/{response_id}/cancel:
    post:
      operationId: cancelOwnedGPTResponse
      summary: Cancel owned background work and settle proven usage
      parameters: *a15
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "402":
          description: Insufficient eligible wallet balance.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
  /responses/{response_id}/input_items:
    get:
      operationId: listOwnedGPTInputItems
      summary: List owned response input items
      parameters:
        - *a14
        - *a7
        - *a8
        - *a9
        - *a10
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
  /openai/pricing:
    get:
      operationId: getOpenAIHostedPrices
      summary: Get final USD hosted service prices
      parameters: []
      responses:
        "200":
          description: Native resource or list object. Only caller-owned resources are returned.
          content:
            application/json:
              schema: *a1
        "400":
          description: Invalid or unsupported parameters.
        "401":
          description: Invalid API key.
        "404":
          description: Resource not owned by this API key, missing or expired.
        "409":
          description: Idempotency conflict or resource operation pending.
      security: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
  schemas:
    GPTModel:
      type: string
      enum:
        - gpt-6.1-sol
        - gpt-6-astra
        - gpt-6-sol
        - gpt-6-luna
    GPTCompactRequest:
      type: object
      required: [model]
      anyOf:
        - required: [input]
        - required: [previous_response_id]
      additionalProperties: false
      properties:
        model:
          $ref: "#/components/schemas/GPTModel"
        input:
          $ref: "#/components/schemas/GPTResponseRequest/properties/input"
        instructions:
          type: [string, "null"]
        previous_response_id:
          type: [string, "null"]
          description: An owned, stored and settled previous response.
        prompt_cache_key:
          type: [string, "null"]
          description: Scoped to the authenticated caller.
        prompt_cache_options:
          type: [object, "null"]
          additionalProperties: true
        prompt_cache_retention:
          type: [string, "null"]
          enum: [in_memory, 24h, null]
        service_tier:
          type: [string, "null"]
          enum: [auto, default, null]
          description: Auto and omission both use Standard processing through GENGEN.
    GPTResponseRequest:
      type: object
      required:
        - model
      anyOf:
        - required: [input]
        - required: [previous_response_id]
      properties:
        model:
          $ref: "#/components/schemas/GPTModel"
        input:
          description: Text or native input items. Owned file/item/container references are validated against the
            authenticated account, workspace and API key.
          oneOf:
            - type: string
              minLength: 1
            - type: array
              minItems: 1
              items:
                type: object
                additionalProperties: true
        instructions:
          type: [string, "null"]
        tools:
          type: array
          maxItems: 128
          items:
            type: object
            required:
              - type
            properties:
              type:
                type: string
                enum:
                  - function
                  - custom
                  - namespace
                  - web_search
                  - web_search_preview
                  - mcp
                  - computer
                  - computer_use_preview
                  - shell
                  - apply_patch
                  - tool_search
                  - file_search
                  - code_interpreter
                  - image_generation
            additionalProperties: true
        tool_choice:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
        parallel_tool_calls:
          type: [boolean, "null"]
        max_tool_calls:
          type: [integer, "null"]
          minimum: 1
          maximum: 20
        reasoning:
          type: [object, "null"]
          properties:
            effort:
              type: string
              enum:
                - none
                - low
                - medium
                - high
                - xhigh
                - max
              default: medium
              description: none is available on Sol and Luna only.
            summary:
              type: string
              enum:
                - auto
                - concise
                - detailed
          additionalProperties: true
        text:
          type: object
          additionalProperties: true
          description: Native format and verbosity; supports strict JSON schema output.
        include:
          type: [array, "null"]
          items:
            type: string
          description: Include reasoning.encrypted_content for stateless tool replay.
        max_output_tokens:
          type: [integer, "null"]
          minimum: 1
          maximum: 128000
        stream:
          type: [boolean, "null"]
          default: false
        stream_options:
          type: [object, "null"]
          additionalProperties: false
          description: Native Responses streaming options. Non-null options require stream true.
            Codex delivery and Chat usage hints are consumed locally; terminal Responses events supply usage.
          properties:
            include_obfuscation:
              type: boolean
              description: Pass through the upstream stream padding preference; omit to keep the upstream default.
            reasoning_summary_delivery:
              type: string
              const: sequential_cutoff
              description: Codex compatibility hint, consumed locally. Summary delivery uses native upstream SSE.
            include_usage:
              type: boolean
              description: Compatibility hint, consumed locally. Terminal usage remains available regardless of this flag.
        context_management:
          type: [array, "null"]
          maxItems: 1
          items:
            type: object
            required: [type]
            additionalProperties: false
            properties:
              type:
                type: string
                const: compaction
              compact_threshold:
                type: [integer, "null"]
                minimum: 1000
        access_programs:
          type: object
          additionalProperties: false
          properties:
            cyber:
              type: string
              const: standard
          description: Only standard is available; an empty object selects standard explicitly.
        user:
          type: [string, "null"]
          description: Legacy identifier, hashed in caller scope; fallback for omitted cache and safety identifiers.
        moderation:
          type: "null"
          description: Inline moderation is unavailable; omit this option or send null.
        store:
          type: [boolean, "null"]
          description: Plain requests default to false. Hosted requests default to true; false uses a ten-minute
            recovery window.
        background:
          type: [boolean, "null"]
          default: false
        service_tier:
          type: [string, "null"]
          enum: [auto, default, null]
          description: Auto and omission both use Standard processing through GENGEN; Fast/Priority/Flex are unavailable.
        truncation:
          type: string
          enum:
            - auto
            - disabled
        metadata:
          type: [object, "null"]
          additionalProperties:
            type: string
        client_metadata:
          type: [object, "null"]
          additionalProperties: true
          description: Native client metadata, including Codex turn metadata. Passed through without changing caller isolation.
        prompt_cache_key:
          type: [string, "null"]
          description: Scoped to authenticated caller by GENGEN.
        prompt_cache_options:
          type: object
          additionalProperties: true
        prompt_cache_retention:
          type: [string, "null"]
        safety_identifier:
          type: [string, "null"]
          description: Scoped to authenticated caller by GENGEN.
        temperature:
          type: [number, "null"]
          description: Requires reasoning effort none on Sol/Luna.
        top_p:
          type: [number, "null"]
          description: Requires reasoning effort none on Sol/Luna.
        top_logprobs:
          type: [integer, "null"]
          description: Requires reasoning effort none on Sol/Luna.
        previous_response_id:
          type: [string, "null"]
          description: An owned, stored and settled previous response.
      additionalProperties: false
    GPTChatRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          $ref: "#/components/schemas/GPTModel"
        messages:
          type: array
          minItems: 1
          items:
            type: object
            additionalProperties: true
        max_completion_tokens:
          type: [integer, "null"]
          minimum: 1
          maximum: 128000
        max_tokens:
          type: [integer, "null"]
          minimum: 1
          maximum: 128000
          deprecated: true
        reasoning_effort:
          type: [string, "null"]
          enum:
            - none
            - low
            - medium
            - high
            - xhigh
            - max
            - null
          default: medium
        tools:
          type: array
          items:
            type: object
            additionalProperties: true
          description: Function declarations only on Sol/Luna with reasoning_effort none.
        tool_choice:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
        functions:
          type: array
          deprecated: true
          items:
            type: object
            additionalProperties: true
        function_call:
          deprecated: true
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
        parallel_tool_calls:
          type: [boolean, "null"]
        response_format:
          type: [object, "null"]
          additionalProperties: true
        stream:
          type: [boolean, "null"]
          default: false
        stream_options:
          type: [object, "null"]
          additionalProperties: true
        temperature:
          type: [number, "null"]
          description: Requires reasoning_effort none.
        top_p:
          type: [number, "null"]
          description: Requires reasoning_effort none.
        logprobs:
          type: [boolean, "null"]
          description: Requires reasoning_effort none.
        top_logprobs:
          type: [integer, "null"]
          description: Requires reasoning_effort none.
        presence_penalty:
          type: [number, "null"]
        frequency_penalty:
          type: [number, "null"]
        stop:
          oneOf:
            - type: "null"
            - type: string
            - type: array
              items:
                type: string
        seed:
          type: [integer, "null"]
        n:
          type: [integer, "null"]
          enum: [1, null]
        metadata:
          type: [object, "null"]
          additionalProperties:
            type: string
        user:
          type: [string, "null"]
          description: Legacy identifier, hashed in caller scope.
        safety_identifier:
          type: [string, "null"]
        prompt_cache_key:
          type: [string, "null"]
        prompt_cache_options:
          type: object
          additionalProperties: true
        prompt_cache_retention:
          type: [string, "null"]
        service_tier:
          type: [string, "null"]
          enum: [auto, default, null]
          description: Auto and omission use Standard processing.
        store:
          type: [boolean, "null"]
          enum: [false, null]
      additionalProperties: false
    GPTResponse:
      type: object
      required:
        - id
        - object
        - model
        - status
        - output
      properties:
        id:
          type: string
        object:
          const: response
        model:
          type: string
        status:
          type: string
          enum:
            - completed
            - incomplete
            - failed
            - queued
            - in_progress
            - cancelled
        output:
          type: array
          items:
            type: object
            additionalProperties: true
        usage:
          type:
            - object
            - "null"
          additionalProperties: true
      additionalProperties: true
