openapi: 3.0.0 info: title: InternTA Chat Completions API description: API for creating chat completions using the InternTA service version: 1.0.0 servers: - url: https://api.ecopi.chat/v1 description: Production server paths: /chat/completions: post: summary: Create a chat completion description: Creates a completion for the chat message operationId: createChatCompletion security: - bearerAuth: [] requestBody: required: true content: application/json: schema: type: object required: - model - messages properties: model: type: string description: ID of the model to use example: "internta-v02" messages: type: array description: A list of messages comprising the conversation items: type: object required: - role - content properties: role: type: string enum: [system, user, assistant] description: The role of the message author content: type: string description: The content of the message responses: '200': description: Successful response content: application/json: schema: type: object properties: id: type: string description: A unique identifier for the completion example: "chatcmpl-1753709210352" object: type: string description: The object type example: "chat.completion" created: type: integer description: The Unix timestamp (in seconds) of when the completion was created example: 1753709210 model: type: string description: The model used for the completion example: "internta-v02" choices: type: array description: A list of completion choices items: type: object properties: index: type: integer description: The index of the choice example: 0 message: type: object properties: role: type: string description: The role of the message author example: "assistant" content: type: string description: The content of the message example: "Sure! Synthetic biology is an interdisciplinary field..." logprobs: type: object nullable: true description: Log probability information for the choice example: null finish_reason: type: string description: The reason the model stopped generating tokens example: "stop" usage: type: object description: Usage statistics for the completion request properties: prompt_tokens: type: integer description: Number of tokens in the prompt example: 100 completion_tokens: type: integer description: Number of tokens in the generated completion example: 10 total_tokens: type: integer description: Total number of tokens used example: 110 system_fingerprint: type: string description: This fingerprint represents the backend configuration that the model runs with example: "fp_2f57f81c11" components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT