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

# Native OpenAI Format

> 基于给定提示创建文本补全



## OpenAPI

````yaml post /v1/completions
openapi: 3.1.0
info:
  title: UToken API
  version: 1.0.0
  description: Complete UToken API Reference Documentation
servers:
  - url: https://utoken.yoostudio.ai
    description: Production
security: []
tags:
  - name: Images / Native Gemini Format
  - name: Images / Native OpenAI Format
  - name: Images / Qwen OpenAI Compatible Format
  - name: Realtime Voice
  - name: Content Moderation
  - name: Text Embeddings
  - name: Unimplemented / Fine-tuning
  - name: Unimplemented / File Management
  - name: Models / List Models
  - name: Chat Completions
  - name: Chat Completions / Native Gemini Format
  - name: Chat Completions / Native OpenAI Format
  - name: Text Completions
  - name: Video Generation
  - name: Video Generation / Sora Format
  - name: Video Generation / Jimeng (Dreamina) Format
  - name: Video Generation / Kling AI Format
  - name: Document Reranking
  - name: Audio Processing
  - name: Audio Processing / Native OpenAI Format
paths:
  /v1/completions:
    post:
      tags:
        - Text Completions
      summary: Native OpenAI Format
      description: Creates text completions based on the given prompt
      operationId: createcompletion
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
              properties:
                model:
                  type: string
                prompt:
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                max_tokens:
                  type: integer
                temperature:
                  type: number
                top_p:
                  type: number
                'n':
                  type: integer
                stream:
                  type: boolean
                stop:
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                suffix:
                  type: string
                echo:
                  type: boolean
              x-apifox-orders:
                - model
                - prompt
                - max_tokens
                - temperature
                - top_p
                - 'n'
                - stream
                - stop
                - suffix
                - echo
      responses:
        '200':
          description: Response created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  object:
                    type: string
                    examples:
                      - text_completion
                  created:
                    type: integer
                  model:
                    type: string
                  choices:
                    type: array
                    items:
                      type: object
                      properties:
                        text:
                          type: string
                        index:
                          type: integer
                        finish_reason:
                          type: string
                      x-apifox-orders:
                        - text
                        - index
                        - finish_reason
                  usage:
                    type: object
                    properties:
                      prompt_tokens:
                        type: integer
                        description: Prompt tokens
                      completion_tokens:
                        type: integer
                        description: Completion tokens
                      total_tokens:
                        type: integer
                        description: Total tokens
                      prompt_tokens_details:
                        type: object
                        properties:
                          cached_tokens:
                            type: integer
                          text_tokens:
                            type: integer
                          audio_tokens:
                            type: integer
                          image_tokens:
                            type: integer
                        x-apifox-orders:
                          - cached_tokens
                          - text_tokens
                          - audio_tokens
                          - image_tokens
                      completion_tokens_details:
                        type: object
                        properties:
                          text_tokens:
                            type: integer
                          audio_tokens:
                            type: integer
                          reasoning_tokens:
                            type: integer
                        x-apifox-orders:
                          - text_tokens
                          - audio_tokens
                          - reasoning_tokens
                    x-apifox-orders:
                      - prompt_tokens
                      - completion_tokens
                      - total_tokens
                      - prompt_tokens_details
                      - completion_tokens_details
                x-apifox-orders:
                  - id
                  - object
                  - created
                  - model
                  - choices
                  - usage
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |-
        Use Bearer Token authentication
        Format: Authorization: Bearer sk-xxxxxx

````