Why can't I use workers ai with auth and api gateway? ``` const response = await config.ai.run(

Why can't I use workers ai with auth and api gateway?

    const response = await config.ai.run('@cf/black-forest-labs/flux-1-schnell',
      {
        prompt,
        steps: DEFAULT_STEPS
      },
      {
        gateway: { id: 'misu-ai' },
        extraHeaders: {
          Authorization: `Bearer ${config.aiGateway.apiToken}`,
          'cf-aig-authorization': `Bearer ${config.aiGateway.apiToken}`,
          'cf-aig-token': `Bearer ${config.aiGateway.apiToken}`
        }
      }
    )

works if i do it without api gateway. with api gateway everytime i get an unathorised error. i have done it with just this header cf-aig-authorization and all the other headers on their own. I am doing open ai requests through my gateway its just workers ai. 0 examples in the dcos doing config.ai.run with an auth tokens. i just assumed i would add the auth to the extra header or something 😭
Was this page helpful?