POST
/
chat
/
completions
Create a chat completion
curl --request POST \
  --url https://api.ecopi.chat/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "internta-v02",
  "messages": [
    {
      "role": "system",
      "content": "<string>"
    }
  ]
}'
{
  "id": "chatcmpl-1753709210352",
  "object": "chat.completion",
  "created": 1753709210,
  "model": "internta-v02",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Sure! Synthetic biology is an interdisciplinary field..."
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 100,
    "completion_tokens": 10,
    "total_tokens": 110
  },
  "system_fingerprint": "fp_2f57f81c11"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
string
required

ID of the model to use

Example:

"internta-v02"

messages
object[]
required

A list of messages comprising the conversation

Response

200 - application/json

Successful response

id
string

A unique identifier for the completion

Example:

"chatcmpl-1753709210352"

object
string

The object type

Example:

"chat.completion"

created
integer

The Unix timestamp (in seconds) of when the completion was created

Example:

1753709210

model
string

The model used for the completion

Example:

"internta-v02"

choices
object[]

A list of completion choices

usage
object

Usage statistics for the completion request

system_fingerprint
string

This fingerprint represents the backend configuration that the model runs with

Example:

"fp_2f57f81c11"