Skip to content

Conversation

DanniBot
Copy link

Summary

fix: add a missing comma after the name field in the Python script for creating indexes

Screenshots (optional)

As-is

import requests

url = "https://api.cloudflare.com/client/v4/accounts/{}/vectorize/v2/indexes".format("your-account-id")

headers = {
    "Authorization": "Bearer <your-api-token>"
}

body = {
  "name": "demo-index"
  "description": "some index description",
  "config": {
    "dimensions": 1024,
    "metric": "euclidean"
  },
}

resp = requests.post(url, headers=headers, json=body)

print('Status Code:', resp.status_code)
print('Response JSON:', resp.json())

To-be

import requests

url = "https://api.cloudflare.com/client/v4/accounts/{}/vectorize/v2/indexes".format("your-account-id")

headers = {
    "Authorization": "Bearer <your-api-token>"
}

body = {
  "name": "demo-index",
  "description": "some index description",
  "config": {
    "dimensions": 1024,
    "metric": "euclidean"
  },
}

resp = requests.post(url, headers=headers, json=body)

print('Status Code:', resp.status_code)
print('Response JSON:', resp.json())

Documentation checklist

@DanniBot DanniBot requested review from a team, elithrar, mchenco, sejoker and vy-ton as code owners October 19, 2025 07:21
@github-actions github-actions bot added October 2025 product:vectorize Vectorize: https://developers.cloudflare.com/vectorize/ size/xs labels Oct 19, 2025
This was referenced Oct 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

October 2025 product:vectorize Vectorize: https://developers.cloudflare.com/vectorize/ size/xs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants