> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plungeai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create completion

> Legacy text completion (proxied to inference-gateway): a chat completion with one user message, answered as text_completion.


## OpenAPI

```yaml openapi.json post /v1/completions
openapi: 3.1.0
info:
  title: Ocean One API
  version: 2.2.0
servers:
  - url: https://api.plungeai.com
paths:
  /v1/completions:
    post:
      operationId: post-v1-completions
      summary: "Legacy text completion (proxied to inference-gateway): a chat completion with one user message, answered as text_completion."
      security:
        - ozkBearer: []
        - skOcean: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
              properties:
                model:
                  type: string
                prompt:
                  type: string
                  description: One string; arrays answer 400 unsupported_parameter.
                max_tokens:
                  type: integer
                stream:
                  type: boolean
              additionalProperties: true
      responses:
        "200":
          description: Text completion
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  object:
                    type: string
                    enum:
                      - text_completion
                  choices:
                    type: array
                    items:
                      type: object
                  usage:
                    type: object
        "400":
          description: unsupported_parameter — prompt must be a single string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Missing/invalid key
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
components:
  schemas:
    Error:
      type: object
      description: Standard error envelope. Every error response also carries an `X-Error-Code` response header equal to error.code, so a client branches on the header regardless of the negotiated body format (json | yaml | markdown | text). When the request created an execution, the `X-Execution-Id` response header is also set. Errors follow the negotiated format like success bodies.
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
          additionalProperties: true
      required:
        - error
  securitySchemes:
    ozkBearer:
      type: http
      scheme: bearer
      description: "ozk_ platform API key (Authorization: Bearer ozk_…)"
    skOcean:
      type: http
      scheme: bearer
      description: "Legacy sk-ocean- inference key: still accepted on the money plane until the sk-ocean- sunset; new integrations use the ozk_ key"
```
