Start using the June API in minutes by following the instructions below.
Create an API Key
- Sign in to June and navigate to the API Keys page.
- Click Create New Key.
- Copy your API key and store it securely. You won't be able to see it again.
Make Your First Request
The base URL for the June API is https://api.blockchain.info/ai/api/v1.
If you are using HTTP requests directly, provide your API Key as a Bearer token in the Authorization header. If you are using an SDK, provide your API Key as a property when initialising the client. Below are some examples for a raw HTTP request, as well as some of the most commonly used SDKs.
curl https://api.blockchain.info/ai/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $JUNE_API_KEY" \
-d '{
"model": "blockchain/june",
"messages": [
{ "role": "user", "content": "Hey June, how are you?" }
]
}'Next Steps
- Learn how to manage your API keys.
- Learn which models are available.
- Learn how to build multi-turn conversations with the API.
- Learn how to use tool calling with the API.