Open gregmichels opened 9 months ago
@KoushikNavuluri @jhchenchong guys, sorry for putting up, something with https://claude.ai/api/append_message, am I right? Endpoint disabled
yes,the same problem: {"error":{"type":"permission_error","message":"Endpoint disabled"}}。It's completely unusable
yes,the same problem: {"error":{"type":"permission_error","message":"Endpoint disabled"}}。It's completely unusable
I'm on half way - they changed the payload structure - so for quick fix is to change URL and payload structure as below:
url = f"https://claude.ai/api/organizations/{self.organization_id}/chat_conversations/{conversation_id}/completion"
payload = json.dumps({
"prompt": prompt,
"timezone": "Asia/Singapore",
"model": f"claude-{self.model_version}",
"attachments": [],
"files": []
})
Yes, I also noticed that it has been modified
Now I see cookies started to change from chat opening - can't repeat my success path yet. Investigation in progress, lemme know if you also find smth please
Yes, but this does not affect the use of this Claude API. I have called this Claude API several times for testing and have not found any problems
OK, now what we have:
1) different URL for send_message and payload as above 2) cookie now should be retrieved (once during login) from the chat window and request with a model name like claude-2.1 or instant - doesn't matter. This cookie can change from time to time - but it doesn't matter 3) Important - response from Claude now should be retrieved in separate GET - they are providing whole dialogue in response.
So it is like POST -> GET + filter/associate with your POST as uuid and generated chronologically.
I would not share my code, as this is not optimal but an emergency. But the general thing is above. Files work as before through attachments.
See fix is here st1vms/unofficial-claude2-api@e2d1b57
Great ! How long before the fix is available through "pip install claude-api" command ? Also, I keep getting "{"type":"permission_error","message":"Endpoint disabled"}}" error. Is it my cookie ? I tried many times but I keep getting this issue. Thank you for your help !
Hi Team, have you ever met an error with {"success":false,"error":"BrotliDecompress failed"}
I don't understand why sometimes there BrotliDecompress issue when retrieving the response Its random and I can't repeat properly
I just put up a fix here on my version: https://github.com/AshwinPathi/claude-api-py. Give it a try and let me know if it works.
I checked the model, but it seems they using another payload? Have anybody experienced the same issues with send_message?