Great question! Our API only supports the /chat/completions endpoint, and does not support the old /v1/responses endpoint. The OpenAI Python module defaults to using /chat/completions, which matches our API, so you must use this endpoint.
Key Points:
- /v1/responses is deprecated and not supported by Pawan.Krd's API (and most new OpenAI-compatible services).
- Always use /v1/chat/completions as the endpoint in your requests.
- Just set your OpenAI API base to our endpoint, use your API key, and interact the same way as with the official OpenAI API—no changes in your message creation logic are required.
Quick Example (Python):
import openai
openai.api_base = "https://api.pawan.krd/cosmosrp/v1"
openai.api_key = "YOUR_API_KEY_HERE"
response = openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=[{"role": "user", "content": "Hello, how are you?"}],
temperature=0.85
)
print(response.choices[0].message.content)
Replace "YOUR_API_KEY_HERE" with your real API key from /key.
Summary:
There’s no /responses endpoint in our API—just use /chat/completions as shown above. For more details, check the Setup Guides Channel.
Good luck on your coding journey! If you need more in-depth help with your code, feel free to wait for community helpers to jump in.
Please note: This is an automated response from @vivid crypt. While it strive to provide accurate assistance, It may occasionally make mistakes. If you find any inaccuracies or need further clarification, feel free to wait for our community helpers to give you further guidance. Thank you.