API integration with ChatGPT

has anyone created openAPI spec for all athlete apis?

1 Like

I can’t get the GPT to talk with the intervals.icu API.

I tried multiple things, giving it my api key, user id, and also API_KEY

Access denied (403) most of the time. Occasionally, it connected, but then access was denied again as soon as I asked it a simple question to see if it worked.

EDIT: I found another GPT that works with OAuth:

EDIT: This is good, but can’t send workouts to interval.icu and see planned workouts for now. I talked to Clive (dev) and its all planned.

2 Likes

Your password is your actual ApIkey number
Your username is API_KEY
And the authentication is basic.

Yes, but ChatGPT then says it can’t do that.

GPT:
Even using API_KEY:apikey, the system still returns “Access denied” — confirming again that:

  • The tool I’m using here is not correctly handling Basic Auth with your API key.
  • There’s no way for me (yet) to manually inject the headers the way Intervals.icu expects.

The plugin I’m using simply doesn’t allow me to set the API key correctly in the way Intervals.icu requires (via HTTP Basic Auth with the key as username). Even though you’ve provided everything correctly, the tool doesn’t support this kind of authentication fully.

This is exactly how the Intervals.icu API works — but unfortunately, the tool I’m using here does not allow me to manually set those authentication headers. It’s locked into a pre-configured setup that doesn’t let me override or inject raw HTTP headers like this.

The plugin system I’m using to call the Intervals.icu API does not expose authentication customization. Even though I know exactly how to call it using curl, Python, or Postman, I can’t replicate that within this tool.

Why I Can’t Connect to the API

This GPT uses a plugin (tool) to talk to Intervals.icu’s API. However:

  • That plugin only accepts one fixed type of authentication.
  • It does not allow me to:
    • Manually set Authorization headers.
    • Use curl-style -u Basic Auth with your API key.
    • Pass credentials in the URL or header directly.
  • As a result, it fails to send your valid API key the way Intervals.icu expects — hence the 403 Access Denied error every time.

etc, etc. :slight_smile:

The key isn‘t the username. The key is the password. The username is literally ‚API_KEY‘.

API_KEY:personalapikeyfromsettingspage

User: API_KEY
Pass: personalapikeyfromsettingspage

Don’t work, access denied 403 - am I doing something wrong?

GPT:
I know it’s frustrating — especially since you’ve provided the correct API key and it works elsewhere — but I want to be transparent:

This GPT’s plugin system does not allow me to manually configure Basic Authentication, even if I provide the username (API_KEY) and password (personalapikeyfromsettingspage) exactly as Intervals.icu requires.

I’ve tested every possible way the plugin accepts credentials — and each time, the result is:

403 Access Denied
(The server rejected the auth headers sent by this tool.)

see here for an example in python Automate Your Training Uploads with a Python Script. This also gives you the json structure to push workouts into the calendar.

Having just tried this using the output of Coach GTP you need to tune the json structure, especially if you have intervals - these all need to be individual steps rather than multipliers (eg 3x20s)

Hi everyone, what a wonderful place this is!!
I’m learning a lot about interval.icu, though I think I’m just getting started. I’d like to use GPT to analyze my workouts, but I can’t connect it to my account…can you help me?
P.S. I’m Italian, are there any Italians here?

Very interesting. I’m after using AI to help with my nutrition and hydration pre/during/post workouts. I’m running on road and trails. At the moment I used GPT to calculate my MB value and then using RPE/duration it has given me recommendations on my daily/weekly supplements but it’s not enough to make it actionnable so I’m looking for next steps.

1/ What fields I need to manually edit in Garmin or Intervals, post run? I guess I need to indicate how much I drink and eat and input CHO/mL values?
2/ Then from there will I be able to anticipate needs for the recovery period, and how to adapt meals planned? I’m rather looking at supplements (what I can eat outside main meals that I share with the family).
Thanks.

Exactly the chart I’m looking to build… Right now I have a Google Sheet :wink: I’m not using TSS at the moment I only use RSS in Stryd Power Center, and only started to explore Intervals load metrics.

I built GitHub - mvilanova/intervals-mcp-server: Model Context Protocol (MCP) server for connecting Claude with the Intervals.icu API back in March and shared it here https://forum.intervals.icu/t/mcp-server-for-connecting-claude-with-intervals-icu-api/ in case folks want to play with it.

2 Likes

Multiple items:

  1. I’m chuckling about one well known coach who was bragging about hacking Training Peaks and creating his own AI to create customised coaching. Hope he saw the light and switched gears. :keyboard:
  2. I left computer networking when scripting became more or less an essential skill. I’m glad I did, especially since the security required now that AI is crawling about must be a nightmare. :unlocked:
  3. I’m very intrigued by the potential of ChatGPT and optional, personal Intervals integration. I’m curious what it would spit out, knowing full well that it’s one viewpoint, not gospel. (Well, gospel is still only one viewpoint. :face_with_monocle:)
  4. Any integration would, for me, require little more than click and go. I’d be more successful at jumbling a basic sentance in 日本語 or 'oleleo Hawai’i than one line of programming. :winking_face_with_tongue:
  5. Thanks to you all on the frontline of this. My hat’s off to you.

Hi @TrainerDay_Alex , interesting! Haven’t been on your site for too long:-o (too busy:-o)

What’s your take on connecting it directly to i.icu. Focusing on the “coaching” not the UI? :wink:

Thanks for pining me, it’s an interesting discussion that I am passionate about. I have no problem sharing my thoughts. I feel like mine mostly disrupt that conversation flow since we are deep in this I see nothing but problems :slight_smile: So it seems to be all about baby steps and getting a lot of feedback. I am not even dealing with the hard parts you are trying to tackle yet. LLM hallucinations and bad ideas are like hidden landmines everywhere.

3 Likes