Use the REST API Early availability
Use cURL to interact with the Aiven AI Gateway REST API.
Prerequisites
- AI Gateway enabled for your organization.
- An API key.
Use cURL
Send a request:
curl -X POST 'https://ai.aiven.io/v1/chat/completions' \
-H 'Authorization: Bearer API_KEY' \
-H 'Content-Type: application/json' \
-d '{ "model": "aiven-model", "messages": [{"role": "user", "content": "Say hello"}] }'
List the available models:
curl 'https://ai.aiven.io/v1/models' \
-H 'Authorization: Bearer API_KEY'
Related pages