Skip to main content
PATCH
/
users
/
{user_id}
/
chat
/
completions
/
{completion_id}
Update chat completion (PATCH)
curl --request PATCH \
  --url https://production.api.onvy.health/users/{user_id}/chat/completions/{completion_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "id": "<string>",
  "object": "<string>",
  "created": 123,
  "model": "<string>",
  "choices": [
    {
      "index": 123,
      "message": {
        "role": "<string>",
        "content": "<string>"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123
  }
}
'
{
  "id": "<string>",
  "object": "<string>",
  "created": 123,
  "model": "<string>",
  "choices": [
    {
      "index": 123,
      "message": {
        "role": "<string>",
        "content": "<string>"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123
  }
}

Authorizations

X-API-Key
string
header
required

API key for authentication

Path Parameters

user_id
string
required

User ID (e.g., google_104940819145861640201)

completion_id
string
required

Chat completion ID

Body

application/json

Partial chat completion data

id
string
required

Unique identifier for the completion

object
string
required
created
integer
required

Unix timestamp

model
string
required

Model used for the completion

choices
object[]
required
usage
object

Response

Chat completion updated successfully

id
string
required

Unique identifier for the completion

object
string
required
created
integer
required

Unix timestamp

model
string
required

Model used for the completion

choices
object[]
required
usage
object