> ## Documentation Index
> Fetch the complete documentation index at: https://www.plungeai.com/docs/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.5.0
servers:
  - url: https://api.plungeai.com
paths:
  /v1/completions:
    post:
      operationId: post-v1-completions
      tags:
        - Compat
      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
                  example: openai/gpt-4o-mini
                prompt:
                  type: string
                  example: Say hi in three words
                  description: One string; arrays answer 400 unsupported_parameter.
                max_tokens:
                  type: integer
                  example: 16
                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: invalid_json — body is not valid JSON; 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"
        "404":
          description: model_not_found — no such model in the catalog
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "405":
          description: "method_not_allowed — the path serves one method: the Allow header names it, plus OPTIONS"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          headers:
            Allow:
              description: The method this path serves, plus OPTIONS
              schema:
                type: string
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
            connect:
              type: object
              description: "On a 424 connection_required / credential_required: where the missing connection is made."
              properties:
                provider:
                  type: string
                method:
                  type: string
                  enum:
                    - oauth
                    - api_key
                    - wallet
                link:
                  type: string
                  example: POST /v1/connections/stripe/link
          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"
```
