Custom Agent Integration with The Grid | OpenAI API Setup
Connect any custom agent to The Grid with the OpenAI API. Set the base URL, add a consumption key, choose an instrument, and handle 402 retries.
Connection details
Verify the key first
curl https://api.thegrid.ai/v1/chat/completions \
-H "Authorization: Bearer $THEGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"text-prime","messages":[{"role":"user","content":"ping"}]}'Drop-in client setup
Resilient retry pattern
Routing across instruments
What works out of the box
Troubleshooting
Last updated
Was this helpful?